From 3ca6f53781c30ca578a8c5808d50e748cd4bb40d Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 12:43:13 +0530 Subject: [PATCH 1/7] Remove unused proto files --- .../cosmos/base/query/v1beta1/pagination.ts | 259 - src/proto/cosmos/base/v1beta1/coin.ts | 325 -- src/proto/gogoproto/gogo.ts | 9 - src/proto/google/api/annotations.ts | 10 - src/proto/google/api/http.ts | 532 -- src/proto/google/protobuf/descriptor.ts | 4262 ----------------- src/proto/google/protobuf/duration.ts | 100 - src/proto/google/protobuf/timestamp.ts | 100 - .../vulcanize/auction/v1beta1/genesis.ts | 105 - src/proto/vulcanize/auction/v1beta1/query.ts | 1103 ----- src/proto/vulcanize/auction/v1beta1/tx.ts | 647 --- src/proto/vulcanize/auction/v1beta1/types.ts | 865 ---- src/proto/vulcanize/bond/v1beta1/bond.ts | 195 - src/proto/vulcanize/bond/v1beta1/genesis.ts | 105 - src/proto/vulcanize/bond/v1beta1/query.ts | 718 --- src/proto/vulcanize/bond/v1beta1/tx.ts | 605 --- .../vulcanize/registry/v1beta1/genesis.ts | 151 - src/proto/vulcanize/registry/v1beta1/query.ts | 2443 ---------- .../vulcanize/registry/v1beta1/registry.ts | 1531 ------ src/proto/vulcanize/registry/v1beta1/tx.ts | 1573 ------ 20 files changed, 15638 deletions(-) delete mode 100644 src/proto/cosmos/base/query/v1beta1/pagination.ts delete mode 100644 src/proto/cosmos/base/v1beta1/coin.ts delete mode 100644 src/proto/gogoproto/gogo.ts delete mode 100644 src/proto/google/api/annotations.ts delete mode 100644 src/proto/google/api/http.ts delete mode 100644 src/proto/google/protobuf/descriptor.ts delete mode 100644 src/proto/google/protobuf/duration.ts delete mode 100644 src/proto/google/protobuf/timestamp.ts delete mode 100644 src/proto/vulcanize/auction/v1beta1/genesis.ts delete mode 100644 src/proto/vulcanize/auction/v1beta1/query.ts delete mode 100644 src/proto/vulcanize/auction/v1beta1/tx.ts delete mode 100644 src/proto/vulcanize/auction/v1beta1/types.ts delete mode 100644 src/proto/vulcanize/bond/v1beta1/bond.ts delete mode 100644 src/proto/vulcanize/bond/v1beta1/genesis.ts delete mode 100644 src/proto/vulcanize/bond/v1beta1/query.ts delete mode 100644 src/proto/vulcanize/bond/v1beta1/tx.ts delete mode 100644 src/proto/vulcanize/registry/v1beta1/genesis.ts delete mode 100644 src/proto/vulcanize/registry/v1beta1/query.ts delete mode 100644 src/proto/vulcanize/registry/v1beta1/registry.ts delete mode 100644 src/proto/vulcanize/registry/v1beta1/tx.ts diff --git a/src/proto/cosmos/base/query/v1beta1/pagination.ts b/src/proto/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index d559483..0000000 --- a/src/proto/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,259 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: cosmos/base/query/v1beta1/pagination.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace cosmos.base.query.v1beta1 { - export class PageRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - key?: Uint8Array; - offset?: number; - limit?: number; - count_total?: boolean; - reverse?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("key" in data && data.key != undefined) { - this.key = data.key; - } - if ("offset" in data && data.offset != undefined) { - this.offset = data.offset; - } - if ("limit" in data && data.limit != undefined) { - this.limit = data.limit; - } - if ("count_total" in data && data.count_total != undefined) { - this.count_total = data.count_total; - } - if ("reverse" in data && data.reverse != undefined) { - this.reverse = data.reverse; - } - } - } - get key() { - return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; - } - set key(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get offset() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set offset(value: number) { - pb_1.Message.setField(this, 2, value); - } - get limit() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set limit(value: number) { - pb_1.Message.setField(this, 3, value); - } - get count_total() { - return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; - } - set count_total(value: boolean) { - pb_1.Message.setField(this, 4, value); - } - get reverse() { - return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; - } - set reverse(value: boolean) { - pb_1.Message.setField(this, 5, value); - } - static fromObject(data: { - key?: Uint8Array; - offset?: number; - limit?: number; - count_total?: boolean; - reverse?: boolean; - }): PageRequest { - const message = new PageRequest({}); - if (data.key != null) { - message.key = data.key; - } - if (data.offset != null) { - message.offset = data.offset; - } - if (data.limit != null) { - message.limit = data.limit; - } - if (data.count_total != null) { - message.count_total = data.count_total; - } - if (data.reverse != null) { - message.reverse = data.reverse; - } - return message; - } - toObject() { - const data: { - key?: Uint8Array; - offset?: number; - limit?: number; - count_total?: boolean; - reverse?: boolean; - } = {}; - if (this.key != null) { - data.key = this.key; - } - if (this.offset != null) { - data.offset = this.offset; - } - if (this.limit != null) { - data.limit = this.limit; - } - if (this.count_total != null) { - data.count_total = this.count_total; - } - if (this.reverse != null) { - data.reverse = this.reverse; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.key.length) - writer.writeBytes(1, this.key); - if (this.offset != 0) - writer.writeUint64(2, this.offset); - if (this.limit != 0) - writer.writeUint64(3, this.limit); - if (this.count_total != false) - writer.writeBool(4, this.count_total); - if (this.reverse != false) - writer.writeBool(5, this.reverse); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.key = reader.readBytes(); - break; - case 2: - message.offset = reader.readUint64(); - break; - case 3: - message.limit = reader.readUint64(); - break; - case 4: - message.count_total = reader.readBool(); - break; - case 5: - message.reverse = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): PageRequest { - return PageRequest.deserialize(bytes); - } - } - export class PageResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - next_key?: Uint8Array; - total?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("next_key" in data && data.next_key != undefined) { - this.next_key = data.next_key; - } - if ("total" in data && data.total != undefined) { - this.total = data.total; - } - } - } - get next_key() { - return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; - } - set next_key(value: Uint8Array) { - pb_1.Message.setField(this, 1, value); - } - get total() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set total(value: number) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - next_key?: Uint8Array; - total?: number; - }): PageResponse { - const message = new PageResponse({}); - if (data.next_key != null) { - message.next_key = data.next_key; - } - if (data.total != null) { - message.total = data.total; - } - return message; - } - toObject() { - const data: { - next_key?: Uint8Array; - total?: number; - } = {}; - if (this.next_key != null) { - data.next_key = this.next_key; - } - if (this.total != null) { - data.total = this.total; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.next_key.length) - writer.writeBytes(1, this.next_key); - if (this.total != 0) - writer.writeUint64(2, this.total); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.next_key = reader.readBytes(); - break; - case 2: - message.total = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): PageResponse { - return PageResponse.deserialize(bytes); - } - } -} diff --git a/src/proto/cosmos/base/v1beta1/coin.ts b/src/proto/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index 51868f6..0000000 --- a/src/proto/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,325 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: cosmos/base/v1beta1/coin.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as pb_1 from "google-protobuf"; -export namespace cosmos.base.v1beta1 { - export class Coin extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - denom?: string; - amount?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("denom" in data && data.denom != undefined) { - this.denom = data.denom; - } - if ("amount" in data && data.amount != undefined) { - this.amount = data.amount; - } - } - } - get denom() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set denom(value: string) { - pb_1.Message.setField(this, 1, value); - } - get amount() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set amount(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - denom?: string; - amount?: string; - }): Coin { - const message = new Coin({}); - if (data.denom != null) { - message.denom = data.denom; - } - if (data.amount != null) { - message.amount = data.amount; - } - return message; - } - toObject() { - const data: { - denom?: string; - amount?: string; - } = {}; - if (this.denom != null) { - data.denom = this.denom; - } - if (this.amount != null) { - data.amount = this.amount; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.denom.length) - writer.writeString(1, this.denom); - if (this.amount.length) - writer.writeString(2, this.amount); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Coin { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Coin(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.denom = reader.readString(); - break; - case 2: - message.amount = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Coin { - return Coin.deserialize(bytes); - } - } - export class DecCoin extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - denom?: string; - amount?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("denom" in data && data.denom != undefined) { - this.denom = data.denom; - } - if ("amount" in data && data.amount != undefined) { - this.amount = data.amount; - } - } - } - get denom() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set denom(value: string) { - pb_1.Message.setField(this, 1, value); - } - get amount() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set amount(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - denom?: string; - amount?: string; - }): DecCoin { - const message = new DecCoin({}); - if (data.denom != null) { - message.denom = data.denom; - } - if (data.amount != null) { - message.amount = data.amount; - } - return message; - } - toObject() { - const data: { - denom?: string; - amount?: string; - } = {}; - if (this.denom != null) { - data.denom = this.denom; - } - if (this.amount != null) { - data.amount = this.amount; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.denom.length) - writer.writeString(1, this.denom); - if (this.amount.length) - writer.writeString(2, this.amount); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecCoin { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecCoin(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.denom = reader.readString(); - break; - case 2: - message.amount = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DecCoin { - return DecCoin.deserialize(bytes); - } - } - export class IntProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - int?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("int" in data && data.int != undefined) { - this.int = data.int; - } - } - } - get int() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set int(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - int?: string; - }): IntProto { - const message = new IntProto({}); - if (data.int != null) { - message.int = data.int; - } - return message; - } - toObject() { - const data: { - int?: string; - } = {}; - if (this.int != null) { - data.int = this.int; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.int.length) - writer.writeString(1, this.int); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IntProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IntProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.int = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): IntProto { - return IntProto.deserialize(bytes); - } - } - export class DecProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - dec?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("dec" in data && data.dec != undefined) { - this.dec = data.dec; - } - } - } - get dec() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set dec(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - dec?: string; - }): DecProto { - const message = new DecProto({}); - if (data.dec != null) { - message.dec = data.dec; - } - return message; - } - toObject() { - const data: { - dec?: string; - } = {}; - if (this.dec != null) { - data.dec = this.dec; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.dec.length) - writer.writeString(1, this.dec); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.dec = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DecProto { - return DecProto.deserialize(bytes); - } - } -} diff --git a/src/proto/gogoproto/gogo.ts b/src/proto/gogoproto/gogo.ts deleted file mode 100644 index 7ef9f53..0000000 --- a/src/proto/gogoproto/gogo.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: gogoproto/gogo.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/descriptor"; -export namespace gogoproto { } diff --git a/src/proto/google/api/annotations.ts b/src/proto/google/api/annotations.ts deleted file mode 100644 index f0a1bf7..0000000 --- a/src/proto/google/api/annotations.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: google/api/annotations.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./http"; -import * as dependency_2 from "./../protobuf/descriptor"; -export namespace google.api { } diff --git a/src/proto/google/api/http.ts b/src/proto/google/api/http.ts deleted file mode 100644 index 2ce7e5b..0000000 --- a/src/proto/google/api/http.ts +++ /dev/null @@ -1,532 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: google/api/http.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.api { - export class Http extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - rules?: HttpRule[]; - fully_decode_reserved_expansion?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("rules" in data && data.rules != undefined) { - this.rules = data.rules; - } - if ("fully_decode_reserved_expansion" in data && data.fully_decode_reserved_expansion != undefined) { - this.fully_decode_reserved_expansion = data.fully_decode_reserved_expansion; - } - } - } - get rules() { - return pb_1.Message.getRepeatedWrapperField(this, HttpRule, 1) as HttpRule[]; - } - set rules(value: HttpRule[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get fully_decode_reserved_expansion() { - return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; - } - set fully_decode_reserved_expansion(value: boolean) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - rules?: ReturnType[]; - fully_decode_reserved_expansion?: boolean; - }): Http { - const message = new Http({}); - if (data.rules != null) { - message.rules = data.rules.map(item => HttpRule.fromObject(item)); - } - if (data.fully_decode_reserved_expansion != null) { - message.fully_decode_reserved_expansion = data.fully_decode_reserved_expansion; - } - return message; - } - toObject() { - const data: { - rules?: ReturnType[]; - fully_decode_reserved_expansion?: boolean; - } = {}; - if (this.rules != null) { - data.rules = this.rules.map((item: HttpRule) => item.toObject()); - } - if (this.fully_decode_reserved_expansion != null) { - data.fully_decode_reserved_expansion = this.fully_decode_reserved_expansion; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.rules.length) - writer.writeRepeatedMessage(1, this.rules, (item: HttpRule) => item.serialize(writer)); - if (this.fully_decode_reserved_expansion != false) - writer.writeBool(2, this.fully_decode_reserved_expansion); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Http { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Http(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.rules, () => pb_1.Message.addToRepeatedWrapperField(message, 1, HttpRule.deserialize(reader), HttpRule)); - break; - case 2: - message.fully_decode_reserved_expansion = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Http { - return Http.deserialize(bytes); - } - } - export class HttpRule extends pb_1.Message { - #one_of_decls: number[][] = [[2, 3, 4, 5, 6, 8]]; - constructor(data?: any[] | ({ - selector?: string; - body?: string; - response_body?: string; - additional_bindings?: HttpRule[]; - } & (({ - get?: string; - put?: never; - post?: never; - delete?: never; - patch?: never; - custom?: never; - } | { - get?: never; - put?: string; - post?: never; - delete?: never; - patch?: never; - custom?: never; - } | { - get?: never; - put?: never; - post?: string; - delete?: never; - patch?: never; - custom?: never; - } | { - get?: never; - put?: never; - post?: never; - delete?: string; - patch?: never; - custom?: never; - } | { - get?: never; - put?: never; - post?: never; - delete?: never; - patch?: string; - custom?: never; - } | { - get?: never; - put?: never; - post?: never; - delete?: never; - patch?: never; - custom?: CustomHttpPattern; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [11], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("selector" in data && data.selector != undefined) { - this.selector = data.selector; - } - if ("get" in data && data.get != undefined) { - this.get = data.get; - } - if ("put" in data && data.put != undefined) { - this.put = data.put; - } - if ("post" in data && data.post != undefined) { - this.post = data.post; - } - if ("delete" in data && data.delete != undefined) { - this.delete = data.delete; - } - if ("patch" in data && data.patch != undefined) { - this.patch = data.patch; - } - if ("custom" in data && data.custom != undefined) { - this.custom = data.custom; - } - if ("body" in data && data.body != undefined) { - this.body = data.body; - } - if ("response_body" in data && data.response_body != undefined) { - this.response_body = data.response_body; - } - if ("additional_bindings" in data && data.additional_bindings != undefined) { - this.additional_bindings = data.additional_bindings; - } - } - } - get selector() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set selector(value: string) { - pb_1.Message.setField(this, 1, value); - } - get get() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set get(value: string) { - pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); - } - get has_get() { - return pb_1.Message.getField(this, 2) != null; - } - get put() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set put(value: string) { - pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value); - } - get has_put() { - return pb_1.Message.getField(this, 3) != null; - } - get post() { - return pb_1.Message.getFieldWithDefault(this, 4, "") as string; - } - set post(value: string) { - pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); - } - get has_post() { - return pb_1.Message.getField(this, 4) != null; - } - get delete() { - return pb_1.Message.getFieldWithDefault(this, 5, "") as string; - } - set delete(value: string) { - pb_1.Message.setOneofField(this, 5, this.#one_of_decls[0], value); - } - get has_delete() { - return pb_1.Message.getField(this, 5) != null; - } - get patch() { - return pb_1.Message.getFieldWithDefault(this, 6, "") as string; - } - set patch(value: string) { - pb_1.Message.setOneofField(this, 6, this.#one_of_decls[0], value); - } - get has_patch() { - return pb_1.Message.getField(this, 6) != null; - } - get custom() { - return pb_1.Message.getWrapperField(this, CustomHttpPattern, 8) as CustomHttpPattern; - } - set custom(value: CustomHttpPattern) { - pb_1.Message.setOneofWrapperField(this, 8, this.#one_of_decls[0], value); - } - get has_custom() { - return pb_1.Message.getField(this, 8) != null; - } - get body() { - return pb_1.Message.getFieldWithDefault(this, 7, "") as string; - } - set body(value: string) { - pb_1.Message.setField(this, 7, value); - } - get response_body() { - return pb_1.Message.getFieldWithDefault(this, 12, "") as string; - } - set response_body(value: string) { - pb_1.Message.setField(this, 12, value); - } - get additional_bindings() { - return pb_1.Message.getRepeatedWrapperField(this, HttpRule, 11) as HttpRule[]; - } - set additional_bindings(value: HttpRule[]) { - pb_1.Message.setRepeatedWrapperField(this, 11, value); - } - get pattern() { - const cases: { - [index: number]: "none" | "get" | "put" | "post" | "delete" | "patch" | "custom"; - } = { - 0: "none", - 2: "get", - 3: "put", - 4: "post", - 5: "delete", - 6: "patch", - 8: "custom" - }; - return cases[pb_1.Message.computeOneofCase(this, [2, 3, 4, 5, 6, 8])]; - } - static fromObject(data: { - selector?: string; - get?: string; - put?: string; - post?: string; - delete?: string; - patch?: string; - custom?: ReturnType; - body?: string; - response_body?: string; - additional_bindings?: ReturnType[]; - }): HttpRule { - const message = new HttpRule({}); - if (data.selector != null) { - message.selector = data.selector; - } - if (data.get != null) { - message.get = data.get; - } - if (data.put != null) { - message.put = data.put; - } - if (data.post != null) { - message.post = data.post; - } - if (data.delete != null) { - message.delete = data.delete; - } - if (data.patch != null) { - message.patch = data.patch; - } - if (data.custom != null) { - message.custom = CustomHttpPattern.fromObject(data.custom); - } - if (data.body != null) { - message.body = data.body; - } - if (data.response_body != null) { - message.response_body = data.response_body; - } - if (data.additional_bindings != null) { - message.additional_bindings = data.additional_bindings.map(item => HttpRule.fromObject(item)); - } - return message; - } - toObject() { - const data: { - selector?: string; - get?: string; - put?: string; - post?: string; - delete?: string; - patch?: string; - custom?: ReturnType; - body?: string; - response_body?: string; - additional_bindings?: ReturnType[]; - } = {}; - if (this.selector != null) { - data.selector = this.selector; - } - if (this.get != null) { - data.get = this.get; - } - if (this.put != null) { - data.put = this.put; - } - if (this.post != null) { - data.post = this.post; - } - if (this.delete != null) { - data.delete = this.delete; - } - if (this.patch != null) { - data.patch = this.patch; - } - if (this.custom != null) { - data.custom = this.custom.toObject(); - } - if (this.body != null) { - data.body = this.body; - } - if (this.response_body != null) { - data.response_body = this.response_body; - } - if (this.additional_bindings != null) { - data.additional_bindings = this.additional_bindings.map((item: HttpRule) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.selector.length) - writer.writeString(1, this.selector); - if (this.has_get) - writer.writeString(2, this.get); - if (this.has_put) - writer.writeString(3, this.put); - if (this.has_post) - writer.writeString(4, this.post); - if (this.has_delete) - writer.writeString(5, this.delete); - if (this.has_patch) - writer.writeString(6, this.patch); - if (this.has_custom) - writer.writeMessage(8, this.custom, () => this.custom.serialize(writer)); - if (this.body.length) - writer.writeString(7, this.body); - if (this.response_body.length) - writer.writeString(12, this.response_body); - if (this.additional_bindings.length) - writer.writeRepeatedMessage(11, this.additional_bindings, (item: HttpRule) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HttpRule { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HttpRule(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.selector = reader.readString(); - break; - case 2: - message.get = reader.readString(); - break; - case 3: - message.put = reader.readString(); - break; - case 4: - message.post = reader.readString(); - break; - case 5: - message.delete = reader.readString(); - break; - case 6: - message.patch = reader.readString(); - break; - case 8: - reader.readMessage(message.custom, () => message.custom = CustomHttpPattern.deserialize(reader)); - break; - case 7: - message.body = reader.readString(); - break; - case 12: - message.response_body = reader.readString(); - break; - case 11: - reader.readMessage(message.additional_bindings, () => pb_1.Message.addToRepeatedWrapperField(message, 11, HttpRule.deserialize(reader), HttpRule)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): HttpRule { - return HttpRule.deserialize(bytes); - } - } - export class CustomHttpPattern extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - kind?: string; - path?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("kind" in data && data.kind != undefined) { - this.kind = data.kind; - } - if ("path" in data && data.path != undefined) { - this.path = data.path; - } - } - } - get kind() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set kind(value: string) { - pb_1.Message.setField(this, 1, value); - } - get path() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set path(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - kind?: string; - path?: string; - }): CustomHttpPattern { - const message = new CustomHttpPattern({}); - if (data.kind != null) { - message.kind = data.kind; - } - if (data.path != null) { - message.path = data.path; - } - return message; - } - toObject() { - const data: { - kind?: string; - path?: string; - } = {}; - if (this.kind != null) { - data.kind = this.kind; - } - if (this.path != null) { - data.path = this.path; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.kind.length) - writer.writeString(1, this.kind); - if (this.path.length) - writer.writeString(2, this.path); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CustomHttpPattern { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CustomHttpPattern(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.kind = reader.readString(); - break; - case 2: - message.path = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): CustomHttpPattern { - return CustomHttpPattern.deserialize(bytes); - } - } -} diff --git a/src/proto/google/protobuf/descriptor.ts b/src/proto/google/protobuf/descriptor.ts deleted file mode 100644 index 7938a29..0000000 --- a/src/proto/google/protobuf/descriptor.ts +++ /dev/null @@ -1,4262 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: google/protobuf/descriptor.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class FileDescriptorSet extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - file: FileDescriptorProto[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.file = data.file; - } - } - get file() { - return pb_1.Message.getRepeatedWrapperField(this, FileDescriptorProto, 1) as FileDescriptorProto[]; - } - set file(value: FileDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - file?: ReturnType[]; - }): FileDescriptorSet { - const message = new FileDescriptorSet({ - file: data.file.map(item => FileDescriptorProto.fromObject(item)) - }); - return message; - } - toObject() { - const data: { - file?: ReturnType[]; - } = {}; - if (this.file != null) { - data.file = this.file.map((item: FileDescriptorProto) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.file.length) - writer.writeRepeatedMessage(1, this.file, (item: FileDescriptorProto) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileDescriptorSet { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileDescriptorSet(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.file, () => pb_1.Message.addToRepeatedWrapperField(message, 1, FileDescriptorProto.deserialize(reader), FileDescriptorProto)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): FileDescriptorSet { - return FileDescriptorSet.deserialize(bytes); - } - } - export class FileDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - package?: string; - dependency: string[]; - public_dependency: number[]; - weak_dependency: number[]; - message_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - service: ServiceDescriptorProto[]; - extension: FieldDescriptorProto[]; - options?: FileOptions; - source_code_info?: SourceCodeInfo; - syntax?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 10, 11, 4, 5, 6, 7], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("package" in data && data.package != undefined) { - this.package = data.package; - } - this.dependency = data.dependency; - this.public_dependency = data.public_dependency; - this.weak_dependency = data.weak_dependency; - this.message_type = data.message_type; - this.enum_type = data.enum_type; - this.service = data.service; - this.extension = data.extension; - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - if ("source_code_info" in data && data.source_code_info != undefined) { - this.source_code_info = data.source_code_info; - } - if ("syntax" in data && data.syntax != undefined) { - this.syntax = data.syntax; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get package() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set package(value: string) { - pb_1.Message.setField(this, 2, value); - } - get has_package() { - return pb_1.Message.getField(this, 2) != null; - } - get dependency() { - return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; - } - set dependency(value: string[]) { - pb_1.Message.setField(this, 3, value); - } - get public_dependency() { - return pb_1.Message.getFieldWithDefault(this, 10, []) as number[]; - } - set public_dependency(value: number[]) { - pb_1.Message.setField(this, 10, value); - } - get weak_dependency() { - return pb_1.Message.getFieldWithDefault(this, 11, []) as number[]; - } - set weak_dependency(value: number[]) { - pb_1.Message.setField(this, 11, value); - } - get message_type() { - return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto, 4) as DescriptorProto[]; - } - set message_type(value: DescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - get enum_type() { - return pb_1.Message.getRepeatedWrapperField(this, EnumDescriptorProto, 5) as EnumDescriptorProto[]; - } - set enum_type(value: EnumDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 5, value); - } - get service() { - return pb_1.Message.getRepeatedWrapperField(this, ServiceDescriptorProto, 6) as ServiceDescriptorProto[]; - } - set service(value: ServiceDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 6, value); - } - get extension() { - return pb_1.Message.getRepeatedWrapperField(this, FieldDescriptorProto, 7) as FieldDescriptorProto[]; - } - set extension(value: FieldDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 7, value); - } - get options() { - return pb_1.Message.getWrapperField(this, FileOptions, 8) as FileOptions; - } - set options(value: FileOptions) { - pb_1.Message.setWrapperField(this, 8, value); - } - get has_options() { - return pb_1.Message.getField(this, 8) != null; - } - get source_code_info() { - return pb_1.Message.getWrapperField(this, SourceCodeInfo, 9) as SourceCodeInfo; - } - set source_code_info(value: SourceCodeInfo) { - pb_1.Message.setWrapperField(this, 9, value); - } - get has_source_code_info() { - return pb_1.Message.getField(this, 9) != null; - } - get syntax() { - return pb_1.Message.getFieldWithDefault(this, 12, "") as string; - } - set syntax(value: string) { - pb_1.Message.setField(this, 12, value); - } - get has_syntax() { - return pb_1.Message.getField(this, 12) != null; - } - static fromObject(data: { - name?: string; - package?: string; - dependency: string[]; - public_dependency: number[]; - weak_dependency: number[]; - message_type?: ReturnType[]; - enum_type?: ReturnType[]; - service?: ReturnType[]; - extension?: ReturnType[]; - options?: ReturnType; - source_code_info?: ReturnType; - syntax?: string; - }): FileDescriptorProto { - const message = new FileDescriptorProto({ - dependency: data.dependency, - public_dependency: data.public_dependency, - weak_dependency: data.weak_dependency, - message_type: data.message_type.map(item => DescriptorProto.fromObject(item)), - enum_type: data.enum_type.map(item => EnumDescriptorProto.fromObject(item)), - service: data.service.map(item => ServiceDescriptorProto.fromObject(item)), - extension: data.extension.map(item => FieldDescriptorProto.fromObject(item)) - }); - if (data.name != null) { - message.name = data.name; - } - if (data.package != null) { - message.package = data.package; - } - if (data.options != null) { - message.options = FileOptions.fromObject(data.options); - } - if (data.source_code_info != null) { - message.source_code_info = SourceCodeInfo.fromObject(data.source_code_info); - } - if (data.syntax != null) { - message.syntax = data.syntax; - } - return message; - } - toObject() { - const data: { - name?: string; - package?: string; - dependency: string[]; - public_dependency: number[]; - weak_dependency: number[]; - message_type?: ReturnType[]; - enum_type?: ReturnType[]; - service?: ReturnType[]; - extension?: ReturnType[]; - options?: ReturnType; - source_code_info?: ReturnType; - syntax?: string; - } = { - dependency: this.dependency, - public_dependency: this.public_dependency, - weak_dependency: this.weak_dependency - }; - if (this.name != null) { - data.name = this.name; - } - if (this.package != null) { - data.package = this.package; - } - if (this.message_type != null) { - data.message_type = this.message_type.map((item: DescriptorProto) => item.toObject()); - } - if (this.enum_type != null) { - data.enum_type = this.enum_type.map((item: EnumDescriptorProto) => item.toObject()); - } - if (this.service != null) { - data.service = this.service.map((item: ServiceDescriptorProto) => item.toObject()); - } - if (this.extension != null) { - data.extension = this.extension.map((item: FieldDescriptorProto) => item.toObject()); - } - if (this.options != null) { - data.options = this.options.toObject(); - } - if (this.source_code_info != null) { - data.source_code_info = this.source_code_info.toObject(); - } - if (this.syntax != null) { - data.syntax = this.syntax; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.has_package && this.package.length) - writer.writeString(2, this.package); - if (this.dependency.length) - writer.writeRepeatedString(3, this.dependency); - if (this.public_dependency.length) - writer.writeRepeatedInt32(10, this.public_dependency); - if (this.weak_dependency.length) - writer.writeRepeatedInt32(11, this.weak_dependency); - if (this.message_type.length) - writer.writeRepeatedMessage(4, this.message_type, (item: DescriptorProto) => item.serialize(writer)); - if (this.enum_type.length) - writer.writeRepeatedMessage(5, this.enum_type, (item: EnumDescriptorProto) => item.serialize(writer)); - if (this.service.length) - writer.writeRepeatedMessage(6, this.service, (item: ServiceDescriptorProto) => item.serialize(writer)); - if (this.extension.length) - writer.writeRepeatedMessage(7, this.extension, (item: FieldDescriptorProto) => item.serialize(writer)); - if (this.has_options) - writer.writeMessage(8, this.options, () => this.options.serialize(writer)); - if (this.has_source_code_info) - writer.writeMessage(9, this.source_code_info, () => this.source_code_info.serialize(writer)); - if (this.has_syntax && this.syntax.length) - writer.writeString(12, this.syntax); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - message.package = reader.readString(); - break; - case 3: - pb_1.Message.addToRepeatedField(message, 3, reader.readString()); - break; - case 10: - pb_1.Message.addToRepeatedField(message, 10, reader.readInt32()); - break; - case 11: - pb_1.Message.addToRepeatedField(message, 11, reader.readInt32()); - break; - case 4: - reader.readMessage(message.message_type, () => pb_1.Message.addToRepeatedWrapperField(message, 4, DescriptorProto.deserialize(reader), DescriptorProto)); - break; - case 5: - reader.readMessage(message.enum_type, () => pb_1.Message.addToRepeatedWrapperField(message, 5, EnumDescriptorProto.deserialize(reader), EnumDescriptorProto)); - break; - case 6: - reader.readMessage(message.service, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ServiceDescriptorProto.deserialize(reader), ServiceDescriptorProto)); - break; - case 7: - reader.readMessage(message.extension, () => pb_1.Message.addToRepeatedWrapperField(message, 7, FieldDescriptorProto.deserialize(reader), FieldDescriptorProto)); - break; - case 8: - reader.readMessage(message.options, () => message.options = FileOptions.deserialize(reader)); - break; - case 9: - reader.readMessage(message.source_code_info, () => message.source_code_info = SourceCodeInfo.deserialize(reader)); - break; - case 12: - message.syntax = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): FileDescriptorProto { - return FileDescriptorProto.deserialize(bytes); - } - } - export class DescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - field: FieldDescriptorProto[]; - extension: FieldDescriptorProto[]; - nested_type: DescriptorProto[]; - enum_type: EnumDescriptorProto[]; - extension_range: DescriptorProto.ExtensionRange[]; - oneof_decl: OneofDescriptorProto[]; - options?: MessageOptions; - reserved_range: DescriptorProto.ReservedRange[]; - reserved_name: string[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 6, 3, 4, 5, 8, 9, 10], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - this.field = data.field; - this.extension = data.extension; - this.nested_type = data.nested_type; - this.enum_type = data.enum_type; - this.extension_range = data.extension_range; - this.oneof_decl = data.oneof_decl; - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - this.reserved_range = data.reserved_range; - this.reserved_name = data.reserved_name; - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get field() { - return pb_1.Message.getRepeatedWrapperField(this, FieldDescriptorProto, 2) as FieldDescriptorProto[]; - } - set field(value: FieldDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - get extension() { - return pb_1.Message.getRepeatedWrapperField(this, FieldDescriptorProto, 6) as FieldDescriptorProto[]; - } - set extension(value: FieldDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 6, value); - } - get nested_type() { - return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto, 3) as DescriptorProto[]; - } - set nested_type(value: DescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - get enum_type() { - return pb_1.Message.getRepeatedWrapperField(this, EnumDescriptorProto, 4) as EnumDescriptorProto[]; - } - set enum_type(value: EnumDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - get extension_range() { - return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto.ExtensionRange, 5) as DescriptorProto.ExtensionRange[]; - } - set extension_range(value: DescriptorProto.ExtensionRange[]) { - pb_1.Message.setRepeatedWrapperField(this, 5, value); - } - get oneof_decl() { - return pb_1.Message.getRepeatedWrapperField(this, OneofDescriptorProto, 8) as OneofDescriptorProto[]; - } - set oneof_decl(value: OneofDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 8, value); - } - get options() { - return pb_1.Message.getWrapperField(this, MessageOptions, 7) as MessageOptions; - } - set options(value: MessageOptions) { - pb_1.Message.setWrapperField(this, 7, value); - } - get has_options() { - return pb_1.Message.getField(this, 7) != null; - } - get reserved_range() { - return pb_1.Message.getRepeatedWrapperField(this, DescriptorProto.ReservedRange, 9) as DescriptorProto.ReservedRange[]; - } - set reserved_range(value: DescriptorProto.ReservedRange[]) { - pb_1.Message.setRepeatedWrapperField(this, 9, value); - } - get reserved_name() { - return pb_1.Message.getFieldWithDefault(this, 10, []) as string[]; - } - set reserved_name(value: string[]) { - pb_1.Message.setField(this, 10, value); - } - static fromObject(data: { - name?: string; - field?: ReturnType[]; - extension?: ReturnType[]; - nested_type?: ReturnType[]; - enum_type?: ReturnType[]; - extension_range?: ReturnType[]; - oneof_decl?: ReturnType[]; - options?: ReturnType; - reserved_range?: ReturnType[]; - reserved_name: string[]; - }): DescriptorProto { - const message = new DescriptorProto({ - field: data.field.map(item => FieldDescriptorProto.fromObject(item)), - extension: data.extension.map(item => FieldDescriptorProto.fromObject(item)), - nested_type: data.nested_type.map(item => DescriptorProto.fromObject(item)), - enum_type: data.enum_type.map(item => EnumDescriptorProto.fromObject(item)), - extension_range: data.extension_range.map(item => DescriptorProto.ExtensionRange.fromObject(item)), - oneof_decl: data.oneof_decl.map(item => OneofDescriptorProto.fromObject(item)), - reserved_range: data.reserved_range.map(item => DescriptorProto.ReservedRange.fromObject(item)), - reserved_name: data.reserved_name - }); - if (data.name != null) { - message.name = data.name; - } - if (data.options != null) { - message.options = MessageOptions.fromObject(data.options); - } - return message; - } - toObject() { - const data: { - name?: string; - field?: ReturnType[]; - extension?: ReturnType[]; - nested_type?: ReturnType[]; - enum_type?: ReturnType[]; - extension_range?: ReturnType[]; - oneof_decl?: ReturnType[]; - options?: ReturnType; - reserved_range?: ReturnType[]; - reserved_name: string[]; - } = { - reserved_name: this.reserved_name - }; - if (this.name != null) { - data.name = this.name; - } - if (this.field != null) { - data.field = this.field.map((item: FieldDescriptorProto) => item.toObject()); - } - if (this.extension != null) { - data.extension = this.extension.map((item: FieldDescriptorProto) => item.toObject()); - } - if (this.nested_type != null) { - data.nested_type = this.nested_type.map((item: DescriptorProto) => item.toObject()); - } - if (this.enum_type != null) { - data.enum_type = this.enum_type.map((item: EnumDescriptorProto) => item.toObject()); - } - if (this.extension_range != null) { - data.extension_range = this.extension_range.map((item: DescriptorProto.ExtensionRange) => item.toObject()); - } - if (this.oneof_decl != null) { - data.oneof_decl = this.oneof_decl.map((item: OneofDescriptorProto) => item.toObject()); - } - if (this.options != null) { - data.options = this.options.toObject(); - } - if (this.reserved_range != null) { - data.reserved_range = this.reserved_range.map((item: DescriptorProto.ReservedRange) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.field.length) - writer.writeRepeatedMessage(2, this.field, (item: FieldDescriptorProto) => item.serialize(writer)); - if (this.extension.length) - writer.writeRepeatedMessage(6, this.extension, (item: FieldDescriptorProto) => item.serialize(writer)); - if (this.nested_type.length) - writer.writeRepeatedMessage(3, this.nested_type, (item: DescriptorProto) => item.serialize(writer)); - if (this.enum_type.length) - writer.writeRepeatedMessage(4, this.enum_type, (item: EnumDescriptorProto) => item.serialize(writer)); - if (this.extension_range.length) - writer.writeRepeatedMessage(5, this.extension_range, (item: DescriptorProto.ExtensionRange) => item.serialize(writer)); - if (this.oneof_decl.length) - writer.writeRepeatedMessage(8, this.oneof_decl, (item: OneofDescriptorProto) => item.serialize(writer)); - if (this.has_options) - writer.writeMessage(7, this.options, () => this.options.serialize(writer)); - if (this.reserved_range.length) - writer.writeRepeatedMessage(9, this.reserved_range, (item: DescriptorProto.ReservedRange) => item.serialize(writer)); - if (this.reserved_name.length) - writer.writeRepeatedString(10, this.reserved_name); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage(message.field, () => pb_1.Message.addToRepeatedWrapperField(message, 2, FieldDescriptorProto.deserialize(reader), FieldDescriptorProto)); - break; - case 6: - reader.readMessage(message.extension, () => pb_1.Message.addToRepeatedWrapperField(message, 6, FieldDescriptorProto.deserialize(reader), FieldDescriptorProto)); - break; - case 3: - reader.readMessage(message.nested_type, () => pb_1.Message.addToRepeatedWrapperField(message, 3, DescriptorProto.deserialize(reader), DescriptorProto)); - break; - case 4: - reader.readMessage(message.enum_type, () => pb_1.Message.addToRepeatedWrapperField(message, 4, EnumDescriptorProto.deserialize(reader), EnumDescriptorProto)); - break; - case 5: - reader.readMessage(message.extension_range, () => pb_1.Message.addToRepeatedWrapperField(message, 5, DescriptorProto.ExtensionRange.deserialize(reader), DescriptorProto.ExtensionRange)); - break; - case 8: - reader.readMessage(message.oneof_decl, () => pb_1.Message.addToRepeatedWrapperField(message, 8, OneofDescriptorProto.deserialize(reader), OneofDescriptorProto)); - break; - case 7: - reader.readMessage(message.options, () => message.options = MessageOptions.deserialize(reader)); - break; - case 9: - reader.readMessage(message.reserved_range, () => pb_1.Message.addToRepeatedWrapperField(message, 9, DescriptorProto.ReservedRange.deserialize(reader), DescriptorProto.ReservedRange)); - break; - case 10: - pb_1.Message.addToRepeatedField(message, 10, reader.readString()); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DescriptorProto { - return DescriptorProto.deserialize(bytes); - } - } - export namespace DescriptorProto { - export class ExtensionRange extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - start?: number; - end?: number; - options?: ExtensionRangeOptions; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("start" in data && data.start != undefined) { - this.start = data.start; - } - if ("end" in data && data.end != undefined) { - this.end = data.end; - } - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - } - } - get start() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set start(value: number) { - pb_1.Message.setField(this, 1, value); - } - get has_start() { - return pb_1.Message.getField(this, 1) != null; - } - get end() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set end(value: number) { - pb_1.Message.setField(this, 2, value); - } - get has_end() { - return pb_1.Message.getField(this, 2) != null; - } - get options() { - return pb_1.Message.getWrapperField(this, ExtensionRangeOptions, 3) as ExtensionRangeOptions; - } - set options(value: ExtensionRangeOptions) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_options() { - return pb_1.Message.getField(this, 3) != null; - } - static fromObject(data: { - start?: number; - end?: number; - options?: ReturnType; - }): ExtensionRange { - const message = new ExtensionRange({}); - if (data.start != null) { - message.start = data.start; - } - if (data.end != null) { - message.end = data.end; - } - if (data.options != null) { - message.options = ExtensionRangeOptions.fromObject(data.options); - } - return message; - } - toObject() { - const data: { - start?: number; - end?: number; - options?: ReturnType; - } = {}; - if (this.start != null) { - data.start = this.start; - } - if (this.end != null) { - data.end = this.end; - } - if (this.options != null) { - data.options = this.options.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_start) - writer.writeInt32(1, this.start); - if (this.has_end) - writer.writeInt32(2, this.end); - if (this.has_options) - writer.writeMessage(3, this.options, () => this.options.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtensionRange { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtensionRange(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.start = reader.readInt32(); - break; - case 2: - message.end = reader.readInt32(); - break; - case 3: - reader.readMessage(message.options, () => message.options = ExtensionRangeOptions.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ExtensionRange { - return ExtensionRange.deserialize(bytes); - } - } - export class ReservedRange extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - start?: number; - end?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("start" in data && data.start != undefined) { - this.start = data.start; - } - if ("end" in data && data.end != undefined) { - this.end = data.end; - } - } - } - get start() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set start(value: number) { - pb_1.Message.setField(this, 1, value); - } - get has_start() { - return pb_1.Message.getField(this, 1) != null; - } - get end() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set end(value: number) { - pb_1.Message.setField(this, 2, value); - } - get has_end() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - start?: number; - end?: number; - }): ReservedRange { - const message = new ReservedRange({}); - if (data.start != null) { - message.start = data.start; - } - if (data.end != null) { - message.end = data.end; - } - return message; - } - toObject() { - const data: { - start?: number; - end?: number; - } = {}; - if (this.start != null) { - data.start = this.start; - } - if (this.end != null) { - data.end = this.end; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_start) - writer.writeInt32(1, this.start); - if (this.has_end) - writer.writeInt32(2, this.end); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ReservedRange { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReservedRange(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.start = reader.readInt32(); - break; - case 2: - message.end = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ReservedRange { - return ReservedRange.deserialize(bytes); - } - } - } - export class ExtensionRangeOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.uninterpreted_option = data.uninterpreted_option; - } - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - uninterpreted_option?: ReturnType[]; - }): ExtensionRangeOptions { - const message = new ExtensionRangeOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - return message; - } - toObject() { - const data: { - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExtensionRangeOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExtensionRangeOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions { - return ExtensionRangeOptions.deserialize(bytes); - } - } - export class FieldDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - number?: number; - label?: FieldDescriptorProto.Label; - type?: FieldDescriptorProto.Type; - type_name?: string; - extendee?: string; - default_value?: string; - oneof_index?: number; - json_name?: string; - options?: FieldOptions; - proto3_optional?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("number" in data && data.number != undefined) { - this.number = data.number; - } - if ("label" in data && data.label != undefined) { - this.label = data.label; - } - if ("type" in data && data.type != undefined) { - this.type = data.type; - } - if ("type_name" in data && data.type_name != undefined) { - this.type_name = data.type_name; - } - if ("extendee" in data && data.extendee != undefined) { - this.extendee = data.extendee; - } - if ("default_value" in data && data.default_value != undefined) { - this.default_value = data.default_value; - } - if ("oneof_index" in data && data.oneof_index != undefined) { - this.oneof_index = data.oneof_index; - } - if ("json_name" in data && data.json_name != undefined) { - this.json_name = data.json_name; - } - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - if ("proto3_optional" in data && data.proto3_optional != undefined) { - this.proto3_optional = data.proto3_optional; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get number() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set number(value: number) { - pb_1.Message.setField(this, 3, value); - } - get has_number() { - return pb_1.Message.getField(this, 3) != null; - } - get label() { - return pb_1.Message.getFieldWithDefault(this, 4, FieldDescriptorProto.Label.LABEL_OPTIONAL) as FieldDescriptorProto.Label; - } - set label(value: FieldDescriptorProto.Label) { - pb_1.Message.setField(this, 4, value); - } - get has_label() { - return pb_1.Message.getField(this, 4) != null; - } - get type() { - return pb_1.Message.getFieldWithDefault(this, 5, FieldDescriptorProto.Type.TYPE_DOUBLE) as FieldDescriptorProto.Type; - } - set type(value: FieldDescriptorProto.Type) { - pb_1.Message.setField(this, 5, value); - } - get has_type() { - return pb_1.Message.getField(this, 5) != null; - } - get type_name() { - return pb_1.Message.getFieldWithDefault(this, 6, "") as string; - } - set type_name(value: string) { - pb_1.Message.setField(this, 6, value); - } - get has_type_name() { - return pb_1.Message.getField(this, 6) != null; - } - get extendee() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set extendee(value: string) { - pb_1.Message.setField(this, 2, value); - } - get has_extendee() { - return pb_1.Message.getField(this, 2) != null; - } - get default_value() { - return pb_1.Message.getFieldWithDefault(this, 7, "") as string; - } - set default_value(value: string) { - pb_1.Message.setField(this, 7, value); - } - get has_default_value() { - return pb_1.Message.getField(this, 7) != null; - } - get oneof_index() { - return pb_1.Message.getFieldWithDefault(this, 9, 0) as number; - } - set oneof_index(value: number) { - pb_1.Message.setField(this, 9, value); - } - get has_oneof_index() { - return pb_1.Message.getField(this, 9) != null; - } - get json_name() { - return pb_1.Message.getFieldWithDefault(this, 10, "") as string; - } - set json_name(value: string) { - pb_1.Message.setField(this, 10, value); - } - get has_json_name() { - return pb_1.Message.getField(this, 10) != null; - } - get options() { - return pb_1.Message.getWrapperField(this, FieldOptions, 8) as FieldOptions; - } - set options(value: FieldOptions) { - pb_1.Message.setWrapperField(this, 8, value); - } - get has_options() { - return pb_1.Message.getField(this, 8) != null; - } - get proto3_optional() { - return pb_1.Message.getFieldWithDefault(this, 17, false) as boolean; - } - set proto3_optional(value: boolean) { - pb_1.Message.setField(this, 17, value); - } - get has_proto3_optional() { - return pb_1.Message.getField(this, 17) != null; - } - static fromObject(data: { - name?: string; - number?: number; - label?: FieldDescriptorProto.Label; - type?: FieldDescriptorProto.Type; - type_name?: string; - extendee?: string; - default_value?: string; - oneof_index?: number; - json_name?: string; - options?: ReturnType; - proto3_optional?: boolean; - }): FieldDescriptorProto { - const message = new FieldDescriptorProto({}); - if (data.name != null) { - message.name = data.name; - } - if (data.number != null) { - message.number = data.number; - } - if (data.label != null) { - message.label = data.label; - } - if (data.type != null) { - message.type = data.type; - } - if (data.type_name != null) { - message.type_name = data.type_name; - } - if (data.extendee != null) { - message.extendee = data.extendee; - } - if (data.default_value != null) { - message.default_value = data.default_value; - } - if (data.oneof_index != null) { - message.oneof_index = data.oneof_index; - } - if (data.json_name != null) { - message.json_name = data.json_name; - } - if (data.options != null) { - message.options = FieldOptions.fromObject(data.options); - } - if (data.proto3_optional != null) { - message.proto3_optional = data.proto3_optional; - } - return message; - } - toObject() { - const data: { - name?: string; - number?: number; - label?: FieldDescriptorProto.Label; - type?: FieldDescriptorProto.Type; - type_name?: string; - extendee?: string; - default_value?: string; - oneof_index?: number; - json_name?: string; - options?: ReturnType; - proto3_optional?: boolean; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.number != null) { - data.number = this.number; - } - if (this.label != null) { - data.label = this.label; - } - if (this.type != null) { - data.type = this.type; - } - if (this.type_name != null) { - data.type_name = this.type_name; - } - if (this.extendee != null) { - data.extendee = this.extendee; - } - if (this.default_value != null) { - data.default_value = this.default_value; - } - if (this.oneof_index != null) { - data.oneof_index = this.oneof_index; - } - if (this.json_name != null) { - data.json_name = this.json_name; - } - if (this.options != null) { - data.options = this.options.toObject(); - } - if (this.proto3_optional != null) { - data.proto3_optional = this.proto3_optional; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.has_number) - writer.writeInt32(3, this.number); - if (this.has_label) - writer.writeEnum(4, this.label); - if (this.has_type) - writer.writeEnum(5, this.type); - if (this.has_type_name && this.type_name.length) - writer.writeString(6, this.type_name); - if (this.has_extendee && this.extendee.length) - writer.writeString(2, this.extendee); - if (this.has_default_value && this.default_value.length) - writer.writeString(7, this.default_value); - if (this.has_oneof_index) - writer.writeInt32(9, this.oneof_index); - if (this.has_json_name && this.json_name.length) - writer.writeString(10, this.json_name); - if (this.has_options) - writer.writeMessage(8, this.options, () => this.options.serialize(writer)); - if (this.has_proto3_optional) - writer.writeBool(17, this.proto3_optional); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FieldDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FieldDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 3: - message.number = reader.readInt32(); - break; - case 4: - message.label = reader.readEnum(); - break; - case 5: - message.type = reader.readEnum(); - break; - case 6: - message.type_name = reader.readString(); - break; - case 2: - message.extendee = reader.readString(); - break; - case 7: - message.default_value = reader.readString(); - break; - case 9: - message.oneof_index = reader.readInt32(); - break; - case 10: - message.json_name = reader.readString(); - break; - case 8: - reader.readMessage(message.options, () => message.options = FieldOptions.deserialize(reader)); - break; - case 17: - message.proto3_optional = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto { - return FieldDescriptorProto.deserialize(bytes); - } - } - export namespace FieldDescriptorProto { - export enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - export enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } - export class OneofDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - options?: OneofOptions; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get options() { - return pb_1.Message.getWrapperField(this, OneofOptions, 2) as OneofOptions; - } - set options(value: OneofOptions) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_options() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - name?: string; - options?: ReturnType; - }): OneofDescriptorProto { - const message = new OneofDescriptorProto({}); - if (data.name != null) { - message.name = data.name; - } - if (data.options != null) { - message.options = OneofOptions.fromObject(data.options); - } - return message; - } - toObject() { - const data: { - name?: string; - options?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.options != null) { - data.options = this.options.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.has_options) - writer.writeMessage(2, this.options, () => this.options.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OneofDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OneofDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage(message.options, () => message.options = OneofOptions.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto { - return OneofDescriptorProto.deserialize(bytes); - } - } - export class EnumDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - value: EnumValueDescriptorProto[]; - options?: EnumOptions; - reserved_range: EnumDescriptorProto.EnumReservedRange[]; - reserved_name: string[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 4, 5], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - this.value = data.value; - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - this.reserved_range = data.reserved_range; - this.reserved_name = data.reserved_name; - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get value() { - return pb_1.Message.getRepeatedWrapperField(this, EnumValueDescriptorProto, 2) as EnumValueDescriptorProto[]; - } - set value(value: EnumValueDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - get options() { - return pb_1.Message.getWrapperField(this, EnumOptions, 3) as EnumOptions; - } - set options(value: EnumOptions) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_options() { - return pb_1.Message.getField(this, 3) != null; - } - get reserved_range() { - return pb_1.Message.getRepeatedWrapperField(this, EnumDescriptorProto.EnumReservedRange, 4) as EnumDescriptorProto.EnumReservedRange[]; - } - set reserved_range(value: EnumDescriptorProto.EnumReservedRange[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - get reserved_name() { - return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; - } - set reserved_name(value: string[]) { - pb_1.Message.setField(this, 5, value); - } - static fromObject(data: { - name?: string; - value?: ReturnType[]; - options?: ReturnType; - reserved_range?: ReturnType[]; - reserved_name: string[]; - }): EnumDescriptorProto { - const message = new EnumDescriptorProto({ - value: data.value.map(item => EnumValueDescriptorProto.fromObject(item)), - reserved_range: data.reserved_range.map(item => EnumDescriptorProto.EnumReservedRange.fromObject(item)), - reserved_name: data.reserved_name - }); - if (data.name != null) { - message.name = data.name; - } - if (data.options != null) { - message.options = EnumOptions.fromObject(data.options); - } - return message; - } - toObject() { - const data: { - name?: string; - value?: ReturnType[]; - options?: ReturnType; - reserved_range?: ReturnType[]; - reserved_name: string[]; - } = { - reserved_name: this.reserved_name - }; - if (this.name != null) { - data.name = this.name; - } - if (this.value != null) { - data.value = this.value.map((item: EnumValueDescriptorProto) => item.toObject()); - } - if (this.options != null) { - data.options = this.options.toObject(); - } - if (this.reserved_range != null) { - data.reserved_range = this.reserved_range.map((item: EnumDescriptorProto.EnumReservedRange) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.value.length) - writer.writeRepeatedMessage(2, this.value, (item: EnumValueDescriptorProto) => item.serialize(writer)); - if (this.has_options) - writer.writeMessage(3, this.options, () => this.options.serialize(writer)); - if (this.reserved_range.length) - writer.writeRepeatedMessage(4, this.reserved_range, (item: EnumDescriptorProto.EnumReservedRange) => item.serialize(writer)); - if (this.reserved_name.length) - writer.writeRepeatedString(5, this.reserved_name); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage(message.value, () => pb_1.Message.addToRepeatedWrapperField(message, 2, EnumValueDescriptorProto.deserialize(reader), EnumValueDescriptorProto)); - break; - case 3: - reader.readMessage(message.options, () => message.options = EnumOptions.deserialize(reader)); - break; - case 4: - reader.readMessage(message.reserved_range, () => pb_1.Message.addToRepeatedWrapperField(message, 4, EnumDescriptorProto.EnumReservedRange.deserialize(reader), EnumDescriptorProto.EnumReservedRange)); - break; - case 5: - pb_1.Message.addToRepeatedField(message, 5, reader.readString()); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto { - return EnumDescriptorProto.deserialize(bytes); - } - } - export namespace EnumDescriptorProto { - export class EnumReservedRange extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - start?: number; - end?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("start" in data && data.start != undefined) { - this.start = data.start; - } - if ("end" in data && data.end != undefined) { - this.end = data.end; - } - } - } - get start() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set start(value: number) { - pb_1.Message.setField(this, 1, value); - } - get has_start() { - return pb_1.Message.getField(this, 1) != null; - } - get end() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set end(value: number) { - pb_1.Message.setField(this, 2, value); - } - get has_end() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - start?: number; - end?: number; - }): EnumReservedRange { - const message = new EnumReservedRange({}); - if (data.start != null) { - message.start = data.start; - } - if (data.end != null) { - message.end = data.end; - } - return message; - } - toObject() { - const data: { - start?: number; - end?: number; - } = {}; - if (this.start != null) { - data.start = this.start; - } - if (this.end != null) { - data.end = this.end; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_start) - writer.writeInt32(1, this.start); - if (this.has_end) - writer.writeInt32(2, this.end); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumReservedRange { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumReservedRange(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.start = reader.readInt32(); - break; - case 2: - message.end = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EnumReservedRange { - return EnumReservedRange.deserialize(bytes); - } - } - } - export class EnumValueDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - number?: number; - options?: EnumValueOptions; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("number" in data && data.number != undefined) { - this.number = data.number; - } - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get number() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set number(value: number) { - pb_1.Message.setField(this, 2, value); - } - get has_number() { - return pb_1.Message.getField(this, 2) != null; - } - get options() { - return pb_1.Message.getWrapperField(this, EnumValueOptions, 3) as EnumValueOptions; - } - set options(value: EnumValueOptions) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_options() { - return pb_1.Message.getField(this, 3) != null; - } - static fromObject(data: { - name?: string; - number?: number; - options?: ReturnType; - }): EnumValueDescriptorProto { - const message = new EnumValueDescriptorProto({}); - if (data.name != null) { - message.name = data.name; - } - if (data.number != null) { - message.number = data.number; - } - if (data.options != null) { - message.options = EnumValueOptions.fromObject(data.options); - } - return message; - } - toObject() { - const data: { - name?: string; - number?: number; - options?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.number != null) { - data.number = this.number; - } - if (this.options != null) { - data.options = this.options.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.has_number) - writer.writeInt32(2, this.number); - if (this.has_options) - writer.writeMessage(3, this.options, () => this.options.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumValueDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumValueDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - message.number = reader.readInt32(); - break; - case 3: - reader.readMessage(message.options, () => message.options = EnumValueOptions.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto { - return EnumValueDescriptorProto.deserialize(bytes); - } - } - export class ServiceDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - method: MethodDescriptorProto[]; - options?: ServiceOptions; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - this.method = data.method; - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get method() { - return pb_1.Message.getRepeatedWrapperField(this, MethodDescriptorProto, 2) as MethodDescriptorProto[]; - } - set method(value: MethodDescriptorProto[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - get options() { - return pb_1.Message.getWrapperField(this, ServiceOptions, 3) as ServiceOptions; - } - set options(value: ServiceOptions) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_options() { - return pb_1.Message.getField(this, 3) != null; - } - static fromObject(data: { - name?: string; - method?: ReturnType[]; - options?: ReturnType; - }): ServiceDescriptorProto { - const message = new ServiceDescriptorProto({ - method: data.method.map(item => MethodDescriptorProto.fromObject(item)) - }); - if (data.name != null) { - message.name = data.name; - } - if (data.options != null) { - message.options = ServiceOptions.fromObject(data.options); - } - return message; - } - toObject() { - const data: { - name?: string; - method?: ReturnType[]; - options?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.method != null) { - data.method = this.method.map((item: MethodDescriptorProto) => item.toObject()); - } - if (this.options != null) { - data.options = this.options.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.method.length) - writer.writeRepeatedMessage(2, this.method, (item: MethodDescriptorProto) => item.serialize(writer)); - if (this.has_options) - writer.writeMessage(3, this.options, () => this.options.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ServiceDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ServiceDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage(message.method, () => pb_1.Message.addToRepeatedWrapperField(message, 2, MethodDescriptorProto.deserialize(reader), MethodDescriptorProto)); - break; - case 3: - reader.readMessage(message.options, () => message.options = ServiceOptions.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto { - return ServiceDescriptorProto.deserialize(bytes); - } - } - export class MethodDescriptorProto extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - input_type?: string; - output_type?: string; - options?: MethodOptions; - client_streaming?: boolean; - server_streaming?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("input_type" in data && data.input_type != undefined) { - this.input_type = data.input_type; - } - if ("output_type" in data && data.output_type != undefined) { - this.output_type = data.output_type; - } - if ("options" in data && data.options != undefined) { - this.options = data.options; - } - if ("client_streaming" in data && data.client_streaming != undefined) { - this.client_streaming = data.client_streaming; - } - if ("server_streaming" in data && data.server_streaming != undefined) { - this.server_streaming = data.server_streaming; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - get input_type() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set input_type(value: string) { - pb_1.Message.setField(this, 2, value); - } - get has_input_type() { - return pb_1.Message.getField(this, 2) != null; - } - get output_type() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set output_type(value: string) { - pb_1.Message.setField(this, 3, value); - } - get has_output_type() { - return pb_1.Message.getField(this, 3) != null; - } - get options() { - return pb_1.Message.getWrapperField(this, MethodOptions, 4) as MethodOptions; - } - set options(value: MethodOptions) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_options() { - return pb_1.Message.getField(this, 4) != null; - } - get client_streaming() { - return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; - } - set client_streaming(value: boolean) { - pb_1.Message.setField(this, 5, value); - } - get has_client_streaming() { - return pb_1.Message.getField(this, 5) != null; - } - get server_streaming() { - return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; - } - set server_streaming(value: boolean) { - pb_1.Message.setField(this, 6, value); - } - get has_server_streaming() { - return pb_1.Message.getField(this, 6) != null; - } - static fromObject(data: { - name?: string; - input_type?: string; - output_type?: string; - options?: ReturnType; - client_streaming?: boolean; - server_streaming?: boolean; - }): MethodDescriptorProto { - const message = new MethodDescriptorProto({}); - if (data.name != null) { - message.name = data.name; - } - if (data.input_type != null) { - message.input_type = data.input_type; - } - if (data.output_type != null) { - message.output_type = data.output_type; - } - if (data.options != null) { - message.options = MethodOptions.fromObject(data.options); - } - if (data.client_streaming != null) { - message.client_streaming = data.client_streaming; - } - if (data.server_streaming != null) { - message.server_streaming = data.server_streaming; - } - return message; - } - toObject() { - const data: { - name?: string; - input_type?: string; - output_type?: string; - options?: ReturnType; - client_streaming?: boolean; - server_streaming?: boolean; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.input_type != null) { - data.input_type = this.input_type; - } - if (this.output_type != null) { - data.output_type = this.output_type; - } - if (this.options != null) { - data.options = this.options.toObject(); - } - if (this.client_streaming != null) { - data.client_streaming = this.client_streaming; - } - if (this.server_streaming != null) { - data.server_streaming = this.server_streaming; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name && this.name.length) - writer.writeString(1, this.name); - if (this.has_input_type && this.input_type.length) - writer.writeString(2, this.input_type); - if (this.has_output_type && this.output_type.length) - writer.writeString(3, this.output_type); - if (this.has_options) - writer.writeMessage(4, this.options, () => this.options.serialize(writer)); - if (this.has_client_streaming) - writer.writeBool(5, this.client_streaming); - if (this.has_server_streaming) - writer.writeBool(6, this.server_streaming); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MethodDescriptorProto { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MethodDescriptorProto(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - message.input_type = reader.readString(); - break; - case 3: - message.output_type = reader.readString(); - break; - case 4: - reader.readMessage(message.options, () => message.options = MethodOptions.deserialize(reader)); - break; - case 5: - message.client_streaming = reader.readBool(); - break; - case 6: - message.server_streaming = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto { - return MethodDescriptorProto.deserialize(bytes); - } - } - export class FileOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - java_package?: string; - java_outer_classname?: string; - java_multiple_files?: boolean; - /** @deprecated*/ - java_generate_equals_and_hash?: boolean; - java_string_check_utf8?: boolean; - optimize_for?: FileOptions.OptimizeMode; - go_package?: string; - cc_generic_services?: boolean; - java_generic_services?: boolean; - py_generic_services?: boolean; - php_generic_services?: boolean; - deprecated?: boolean; - cc_enable_arenas?: boolean; - objc_class_prefix?: string; - csharp_namespace?: string; - swift_prefix?: string; - php_class_prefix?: string; - php_namespace?: string; - php_metadata_namespace?: string; - ruby_package?: string; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("java_package" in data && data.java_package != undefined) { - this.java_package = data.java_package; - } - if ("java_outer_classname" in data && data.java_outer_classname != undefined) { - this.java_outer_classname = data.java_outer_classname; - } - if ("java_multiple_files" in data && data.java_multiple_files != undefined) { - this.java_multiple_files = data.java_multiple_files; - } - if ("java_generate_equals_and_hash" in data && data.java_generate_equals_and_hash != undefined) { - this.java_generate_equals_and_hash = data.java_generate_equals_and_hash; - } - if ("java_string_check_utf8" in data && data.java_string_check_utf8 != undefined) { - this.java_string_check_utf8 = data.java_string_check_utf8; - } - if ("optimize_for" in data && data.optimize_for != undefined) { - this.optimize_for = data.optimize_for; - } - if ("go_package" in data && data.go_package != undefined) { - this.go_package = data.go_package; - } - if ("cc_generic_services" in data && data.cc_generic_services != undefined) { - this.cc_generic_services = data.cc_generic_services; - } - if ("java_generic_services" in data && data.java_generic_services != undefined) { - this.java_generic_services = data.java_generic_services; - } - if ("py_generic_services" in data && data.py_generic_services != undefined) { - this.py_generic_services = data.py_generic_services; - } - if ("php_generic_services" in data && data.php_generic_services != undefined) { - this.php_generic_services = data.php_generic_services; - } - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - if ("cc_enable_arenas" in data && data.cc_enable_arenas != undefined) { - this.cc_enable_arenas = data.cc_enable_arenas; - } - if ("objc_class_prefix" in data && data.objc_class_prefix != undefined) { - this.objc_class_prefix = data.objc_class_prefix; - } - if ("csharp_namespace" in data && data.csharp_namespace != undefined) { - this.csharp_namespace = data.csharp_namespace; - } - if ("swift_prefix" in data && data.swift_prefix != undefined) { - this.swift_prefix = data.swift_prefix; - } - if ("php_class_prefix" in data && data.php_class_prefix != undefined) { - this.php_class_prefix = data.php_class_prefix; - } - if ("php_namespace" in data && data.php_namespace != undefined) { - this.php_namespace = data.php_namespace; - } - if ("php_metadata_namespace" in data && data.php_metadata_namespace != undefined) { - this.php_metadata_namespace = data.php_metadata_namespace; - } - if ("ruby_package" in data && data.ruby_package != undefined) { - this.ruby_package = data.ruby_package; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get java_package() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set java_package(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_java_package() { - return pb_1.Message.getField(this, 1) != null; - } - get java_outer_classname() { - return pb_1.Message.getFieldWithDefault(this, 8, "") as string; - } - set java_outer_classname(value: string) { - pb_1.Message.setField(this, 8, value); - } - get has_java_outer_classname() { - return pb_1.Message.getField(this, 8) != null; - } - get java_multiple_files() { - return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; - } - set java_multiple_files(value: boolean) { - pb_1.Message.setField(this, 10, value); - } - get has_java_multiple_files() { - return pb_1.Message.getField(this, 10) != null; - } - /** @deprecated*/ - get java_generate_equals_and_hash() { - return pb_1.Message.getFieldWithDefault(this, 20, false) as boolean; - } - /** @deprecated*/ - set java_generate_equals_and_hash(value: boolean) { - pb_1.Message.setField(this, 20, value); - } - /** @deprecated*/ - get has_java_generate_equals_and_hash() { - return pb_1.Message.getField(this, 20) != null; - } - get java_string_check_utf8() { - return pb_1.Message.getFieldWithDefault(this, 27, false) as boolean; - } - set java_string_check_utf8(value: boolean) { - pb_1.Message.setField(this, 27, value); - } - get has_java_string_check_utf8() { - return pb_1.Message.getField(this, 27) != null; - } - get optimize_for() { - return pb_1.Message.getFieldWithDefault(this, 9, FileOptions.OptimizeMode.SPEED) as FileOptions.OptimizeMode; - } - set optimize_for(value: FileOptions.OptimizeMode) { - pb_1.Message.setField(this, 9, value); - } - get has_optimize_for() { - return pb_1.Message.getField(this, 9) != null; - } - get go_package() { - return pb_1.Message.getFieldWithDefault(this, 11, "") as string; - } - set go_package(value: string) { - pb_1.Message.setField(this, 11, value); - } - get has_go_package() { - return pb_1.Message.getField(this, 11) != null; - } - get cc_generic_services() { - return pb_1.Message.getFieldWithDefault(this, 16, false) as boolean; - } - set cc_generic_services(value: boolean) { - pb_1.Message.setField(this, 16, value); - } - get has_cc_generic_services() { - return pb_1.Message.getField(this, 16) != null; - } - get java_generic_services() { - return pb_1.Message.getFieldWithDefault(this, 17, false) as boolean; - } - set java_generic_services(value: boolean) { - pb_1.Message.setField(this, 17, value); - } - get has_java_generic_services() { - return pb_1.Message.getField(this, 17) != null; - } - get py_generic_services() { - return pb_1.Message.getFieldWithDefault(this, 18, false) as boolean; - } - set py_generic_services(value: boolean) { - pb_1.Message.setField(this, 18, value); - } - get has_py_generic_services() { - return pb_1.Message.getField(this, 18) != null; - } - get php_generic_services() { - return pb_1.Message.getFieldWithDefault(this, 42, false) as boolean; - } - set php_generic_services(value: boolean) { - pb_1.Message.setField(this, 42, value); - } - get has_php_generic_services() { - return pb_1.Message.getField(this, 42) != null; - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 23, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 23, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 23) != null; - } - get cc_enable_arenas() { - return pb_1.Message.getFieldWithDefault(this, 31, true) as boolean; - } - set cc_enable_arenas(value: boolean) { - pb_1.Message.setField(this, 31, value); - } - get has_cc_enable_arenas() { - return pb_1.Message.getField(this, 31) != null; - } - get objc_class_prefix() { - return pb_1.Message.getFieldWithDefault(this, 36, "") as string; - } - set objc_class_prefix(value: string) { - pb_1.Message.setField(this, 36, value); - } - get has_objc_class_prefix() { - return pb_1.Message.getField(this, 36) != null; - } - get csharp_namespace() { - return pb_1.Message.getFieldWithDefault(this, 37, "") as string; - } - set csharp_namespace(value: string) { - pb_1.Message.setField(this, 37, value); - } - get has_csharp_namespace() { - return pb_1.Message.getField(this, 37) != null; - } - get swift_prefix() { - return pb_1.Message.getFieldWithDefault(this, 39, "") as string; - } - set swift_prefix(value: string) { - pb_1.Message.setField(this, 39, value); - } - get has_swift_prefix() { - return pb_1.Message.getField(this, 39) != null; - } - get php_class_prefix() { - return pb_1.Message.getFieldWithDefault(this, 40, "") as string; - } - set php_class_prefix(value: string) { - pb_1.Message.setField(this, 40, value); - } - get has_php_class_prefix() { - return pb_1.Message.getField(this, 40) != null; - } - get php_namespace() { - return pb_1.Message.getFieldWithDefault(this, 41, "") as string; - } - set php_namespace(value: string) { - pb_1.Message.setField(this, 41, value); - } - get has_php_namespace() { - return pb_1.Message.getField(this, 41) != null; - } - get php_metadata_namespace() { - return pb_1.Message.getFieldWithDefault(this, 44, "") as string; - } - set php_metadata_namespace(value: string) { - pb_1.Message.setField(this, 44, value); - } - get has_php_metadata_namespace() { - return pb_1.Message.getField(this, 44) != null; - } - get ruby_package() { - return pb_1.Message.getFieldWithDefault(this, 45, "") as string; - } - set ruby_package(value: string) { - pb_1.Message.setField(this, 45, value); - } - get has_ruby_package() { - return pb_1.Message.getField(this, 45) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - java_package?: string; - java_outer_classname?: string; - java_multiple_files?: boolean; - java_generate_equals_and_hash?: boolean; - java_string_check_utf8?: boolean; - optimize_for?: FileOptions.OptimizeMode; - go_package?: string; - cc_generic_services?: boolean; - java_generic_services?: boolean; - py_generic_services?: boolean; - php_generic_services?: boolean; - deprecated?: boolean; - cc_enable_arenas?: boolean; - objc_class_prefix?: string; - csharp_namespace?: string; - swift_prefix?: string; - php_class_prefix?: string; - php_namespace?: string; - php_metadata_namespace?: string; - ruby_package?: string; - uninterpreted_option?: ReturnType[]; - }): FileOptions { - const message = new FileOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.java_package != null) { - message.java_package = data.java_package; - } - if (data.java_outer_classname != null) { - message.java_outer_classname = data.java_outer_classname; - } - if (data.java_multiple_files != null) { - message.java_multiple_files = data.java_multiple_files; - } - if (data.java_generate_equals_and_hash != null) { - message.java_generate_equals_and_hash = data.java_generate_equals_and_hash; - } - if (data.java_string_check_utf8 != null) { - message.java_string_check_utf8 = data.java_string_check_utf8; - } - if (data.optimize_for != null) { - message.optimize_for = data.optimize_for; - } - if (data.go_package != null) { - message.go_package = data.go_package; - } - if (data.cc_generic_services != null) { - message.cc_generic_services = data.cc_generic_services; - } - if (data.java_generic_services != null) { - message.java_generic_services = data.java_generic_services; - } - if (data.py_generic_services != null) { - message.py_generic_services = data.py_generic_services; - } - if (data.php_generic_services != null) { - message.php_generic_services = data.php_generic_services; - } - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - if (data.cc_enable_arenas != null) { - message.cc_enable_arenas = data.cc_enable_arenas; - } - if (data.objc_class_prefix != null) { - message.objc_class_prefix = data.objc_class_prefix; - } - if (data.csharp_namespace != null) { - message.csharp_namespace = data.csharp_namespace; - } - if (data.swift_prefix != null) { - message.swift_prefix = data.swift_prefix; - } - if (data.php_class_prefix != null) { - message.php_class_prefix = data.php_class_prefix; - } - if (data.php_namespace != null) { - message.php_namespace = data.php_namespace; - } - if (data.php_metadata_namespace != null) { - message.php_metadata_namespace = data.php_metadata_namespace; - } - if (data.ruby_package != null) { - message.ruby_package = data.ruby_package; - } - return message; - } - toObject() { - const data: { - java_package?: string; - java_outer_classname?: string; - java_multiple_files?: boolean; - java_generate_equals_and_hash?: boolean; - java_string_check_utf8?: boolean; - optimize_for?: FileOptions.OptimizeMode; - go_package?: string; - cc_generic_services?: boolean; - java_generic_services?: boolean; - py_generic_services?: boolean; - php_generic_services?: boolean; - deprecated?: boolean; - cc_enable_arenas?: boolean; - objc_class_prefix?: string; - csharp_namespace?: string; - swift_prefix?: string; - php_class_prefix?: string; - php_namespace?: string; - php_metadata_namespace?: string; - ruby_package?: string; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.java_package != null) { - data.java_package = this.java_package; - } - if (this.java_outer_classname != null) { - data.java_outer_classname = this.java_outer_classname; - } - if (this.java_multiple_files != null) { - data.java_multiple_files = this.java_multiple_files; - } - if (this.java_generate_equals_and_hash != null) { - data.java_generate_equals_and_hash = this.java_generate_equals_and_hash; - } - if (this.java_string_check_utf8 != null) { - data.java_string_check_utf8 = this.java_string_check_utf8; - } - if (this.optimize_for != null) { - data.optimize_for = this.optimize_for; - } - if (this.go_package != null) { - data.go_package = this.go_package; - } - if (this.cc_generic_services != null) { - data.cc_generic_services = this.cc_generic_services; - } - if (this.java_generic_services != null) { - data.java_generic_services = this.java_generic_services; - } - if (this.py_generic_services != null) { - data.py_generic_services = this.py_generic_services; - } - if (this.php_generic_services != null) { - data.php_generic_services = this.php_generic_services; - } - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.cc_enable_arenas != null) { - data.cc_enable_arenas = this.cc_enable_arenas; - } - if (this.objc_class_prefix != null) { - data.objc_class_prefix = this.objc_class_prefix; - } - if (this.csharp_namespace != null) { - data.csharp_namespace = this.csharp_namespace; - } - if (this.swift_prefix != null) { - data.swift_prefix = this.swift_prefix; - } - if (this.php_class_prefix != null) { - data.php_class_prefix = this.php_class_prefix; - } - if (this.php_namespace != null) { - data.php_namespace = this.php_namespace; - } - if (this.php_metadata_namespace != null) { - data.php_metadata_namespace = this.php_metadata_namespace; - } - if (this.ruby_package != null) { - data.ruby_package = this.ruby_package; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_java_package && this.java_package.length) - writer.writeString(1, this.java_package); - if (this.has_java_outer_classname && this.java_outer_classname.length) - writer.writeString(8, this.java_outer_classname); - if (this.has_java_multiple_files) - writer.writeBool(10, this.java_multiple_files); - if (this.has_java_generate_equals_and_hash) - writer.writeBool(20, this.java_generate_equals_and_hash); - if (this.has_java_string_check_utf8) - writer.writeBool(27, this.java_string_check_utf8); - if (this.has_optimize_for) - writer.writeEnum(9, this.optimize_for); - if (this.has_go_package && this.go_package.length) - writer.writeString(11, this.go_package); - if (this.has_cc_generic_services) - writer.writeBool(16, this.cc_generic_services); - if (this.has_java_generic_services) - writer.writeBool(17, this.java_generic_services); - if (this.has_py_generic_services) - writer.writeBool(18, this.py_generic_services); - if (this.has_php_generic_services) - writer.writeBool(42, this.php_generic_services); - if (this.has_deprecated) - writer.writeBool(23, this.deprecated); - if (this.has_cc_enable_arenas) - writer.writeBool(31, this.cc_enable_arenas); - if (this.has_objc_class_prefix && this.objc_class_prefix.length) - writer.writeString(36, this.objc_class_prefix); - if (this.has_csharp_namespace && this.csharp_namespace.length) - writer.writeString(37, this.csharp_namespace); - if (this.has_swift_prefix && this.swift_prefix.length) - writer.writeString(39, this.swift_prefix); - if (this.has_php_class_prefix && this.php_class_prefix.length) - writer.writeString(40, this.php_class_prefix); - if (this.has_php_namespace && this.php_namespace.length) - writer.writeString(41, this.php_namespace); - if (this.has_php_metadata_namespace && this.php_metadata_namespace.length) - writer.writeString(44, this.php_metadata_namespace); - if (this.has_ruby_package && this.ruby_package.length) - writer.writeString(45, this.ruby_package); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FileOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FileOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.java_package = reader.readString(); - break; - case 8: - message.java_outer_classname = reader.readString(); - break; - case 10: - message.java_multiple_files = reader.readBool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.readBool(); - break; - case 27: - message.java_string_check_utf8 = reader.readBool(); - break; - case 9: - message.optimize_for = reader.readEnum(); - break; - case 11: - message.go_package = reader.readString(); - break; - case 16: - message.cc_generic_services = reader.readBool(); - break; - case 17: - message.java_generic_services = reader.readBool(); - break; - case 18: - message.py_generic_services = reader.readBool(); - break; - case 42: - message.php_generic_services = reader.readBool(); - break; - case 23: - message.deprecated = reader.readBool(); - break; - case 31: - message.cc_enable_arenas = reader.readBool(); - break; - case 36: - message.objc_class_prefix = reader.readString(); - break; - case 37: - message.csharp_namespace = reader.readString(); - break; - case 39: - message.swift_prefix = reader.readString(); - break; - case 40: - message.php_class_prefix = reader.readString(); - break; - case 41: - message.php_namespace = reader.readString(); - break; - case 44: - message.php_metadata_namespace = reader.readString(); - break; - case 45: - message.ruby_package = reader.readString(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): FileOptions { - return FileOptions.deserialize(bytes); - } - } - export namespace FileOptions { - export enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - export class MessageOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - message_set_wire_format?: boolean; - no_standard_descriptor_accessor?: boolean; - deprecated?: boolean; - map_entry?: boolean; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("message_set_wire_format" in data && data.message_set_wire_format != undefined) { - this.message_set_wire_format = data.message_set_wire_format; - } - if ("no_standard_descriptor_accessor" in data && data.no_standard_descriptor_accessor != undefined) { - this.no_standard_descriptor_accessor = data.no_standard_descriptor_accessor; - } - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - if ("map_entry" in data && data.map_entry != undefined) { - this.map_entry = data.map_entry; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get message_set_wire_format() { - return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; - } - set message_set_wire_format(value: boolean) { - pb_1.Message.setField(this, 1, value); - } - get has_message_set_wire_format() { - return pb_1.Message.getField(this, 1) != null; - } - get no_standard_descriptor_accessor() { - return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; - } - set no_standard_descriptor_accessor(value: boolean) { - pb_1.Message.setField(this, 2, value); - } - get has_no_standard_descriptor_accessor() { - return pb_1.Message.getField(this, 2) != null; - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 3, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 3) != null; - } - get map_entry() { - return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean; - } - set map_entry(value: boolean) { - pb_1.Message.setField(this, 7, value); - } - get has_map_entry() { - return pb_1.Message.getField(this, 7) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - message_set_wire_format?: boolean; - no_standard_descriptor_accessor?: boolean; - deprecated?: boolean; - map_entry?: boolean; - uninterpreted_option?: ReturnType[]; - }): MessageOptions { - const message = new MessageOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.message_set_wire_format != null) { - message.message_set_wire_format = data.message_set_wire_format; - } - if (data.no_standard_descriptor_accessor != null) { - message.no_standard_descriptor_accessor = data.no_standard_descriptor_accessor; - } - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - if (data.map_entry != null) { - message.map_entry = data.map_entry; - } - return message; - } - toObject() { - const data: { - message_set_wire_format?: boolean; - no_standard_descriptor_accessor?: boolean; - deprecated?: boolean; - map_entry?: boolean; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.message_set_wire_format != null) { - data.message_set_wire_format = this.message_set_wire_format; - } - if (this.no_standard_descriptor_accessor != null) { - data.no_standard_descriptor_accessor = this.no_standard_descriptor_accessor; - } - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.map_entry != null) { - data.map_entry = this.map_entry; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_message_set_wire_format) - writer.writeBool(1, this.message_set_wire_format); - if (this.has_no_standard_descriptor_accessor) - writer.writeBool(2, this.no_standard_descriptor_accessor); - if (this.has_deprecated) - writer.writeBool(3, this.deprecated); - if (this.has_map_entry) - writer.writeBool(7, this.map_entry); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MessageOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MessageOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.message_set_wire_format = reader.readBool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.readBool(); - break; - case 3: - message.deprecated = reader.readBool(); - break; - case 7: - message.map_entry = reader.readBool(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MessageOptions { - return MessageOptions.deserialize(bytes); - } - } - export class FieldOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - ctype?: FieldOptions.CType; - packed?: boolean; - jstype?: FieldOptions.JSType; - lazy?: boolean; - deprecated?: boolean; - weak?: boolean; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("ctype" in data && data.ctype != undefined) { - this.ctype = data.ctype; - } - if ("packed" in data && data.packed != undefined) { - this.packed = data.packed; - } - if ("jstype" in data && data.jstype != undefined) { - this.jstype = data.jstype; - } - if ("lazy" in data && data.lazy != undefined) { - this.lazy = data.lazy; - } - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - if ("weak" in data && data.weak != undefined) { - this.weak = data.weak; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get ctype() { - return pb_1.Message.getFieldWithDefault(this, 1, FieldOptions.CType.STRING) as FieldOptions.CType; - } - set ctype(value: FieldOptions.CType) { - pb_1.Message.setField(this, 1, value); - } - get has_ctype() { - return pb_1.Message.getField(this, 1) != null; - } - get packed() { - return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; - } - set packed(value: boolean) { - pb_1.Message.setField(this, 2, value); - } - get has_packed() { - return pb_1.Message.getField(this, 2) != null; - } - get jstype() { - return pb_1.Message.getFieldWithDefault(this, 6, FieldOptions.JSType.JS_NORMAL) as FieldOptions.JSType; - } - set jstype(value: FieldOptions.JSType) { - pb_1.Message.setField(this, 6, value); - } - get has_jstype() { - return pb_1.Message.getField(this, 6) != null; - } - get lazy() { - return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; - } - set lazy(value: boolean) { - pb_1.Message.setField(this, 5, value); - } - get has_lazy() { - return pb_1.Message.getField(this, 5) != null; - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 3, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 3) != null; - } - get weak() { - return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean; - } - set weak(value: boolean) { - pb_1.Message.setField(this, 10, value); - } - get has_weak() { - return pb_1.Message.getField(this, 10) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - ctype?: FieldOptions.CType; - packed?: boolean; - jstype?: FieldOptions.JSType; - lazy?: boolean; - deprecated?: boolean; - weak?: boolean; - uninterpreted_option?: ReturnType[]; - }): FieldOptions { - const message = new FieldOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.ctype != null) { - message.ctype = data.ctype; - } - if (data.packed != null) { - message.packed = data.packed; - } - if (data.jstype != null) { - message.jstype = data.jstype; - } - if (data.lazy != null) { - message.lazy = data.lazy; - } - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - if (data.weak != null) { - message.weak = data.weak; - } - return message; - } - toObject() { - const data: { - ctype?: FieldOptions.CType; - packed?: boolean; - jstype?: FieldOptions.JSType; - lazy?: boolean; - deprecated?: boolean; - weak?: boolean; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.ctype != null) { - data.ctype = this.ctype; - } - if (this.packed != null) { - data.packed = this.packed; - } - if (this.jstype != null) { - data.jstype = this.jstype; - } - if (this.lazy != null) { - data.lazy = this.lazy; - } - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.weak != null) { - data.weak = this.weak; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_ctype) - writer.writeEnum(1, this.ctype); - if (this.has_packed) - writer.writeBool(2, this.packed); - if (this.has_jstype) - writer.writeEnum(6, this.jstype); - if (this.has_lazy) - writer.writeBool(5, this.lazy); - if (this.has_deprecated) - writer.writeBool(3, this.deprecated); - if (this.has_weak) - writer.writeBool(10, this.weak); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FieldOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FieldOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.ctype = reader.readEnum(); - break; - case 2: - message.packed = reader.readBool(); - break; - case 6: - message.jstype = reader.readEnum(); - break; - case 5: - message.lazy = reader.readBool(); - break; - case 3: - message.deprecated = reader.readBool(); - break; - case 10: - message.weak = reader.readBool(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): FieldOptions { - return FieldOptions.deserialize(bytes); - } - } - export namespace FieldOptions { - export enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - export enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } - export class OneofOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.uninterpreted_option = data.uninterpreted_option; - } - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - uninterpreted_option?: ReturnType[]; - }): OneofOptions { - const message = new OneofOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - return message; - } - toObject() { - const data: { - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OneofOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OneofOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): OneofOptions { - return OneofOptions.deserialize(bytes); - } - } - export class EnumOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - allow_alias?: boolean; - deprecated?: boolean; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("allow_alias" in data && data.allow_alias != undefined) { - this.allow_alias = data.allow_alias; - } - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get allow_alias() { - return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; - } - set allow_alias(value: boolean) { - pb_1.Message.setField(this, 2, value); - } - get has_allow_alias() { - return pb_1.Message.getField(this, 2) != null; - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 3, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 3) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - allow_alias?: boolean; - deprecated?: boolean; - uninterpreted_option?: ReturnType[]; - }): EnumOptions { - const message = new EnumOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.allow_alias != null) { - message.allow_alias = data.allow_alias; - } - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - return message; - } - toObject() { - const data: { - allow_alias?: boolean; - deprecated?: boolean; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.allow_alias != null) { - data.allow_alias = this.allow_alias; - } - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_allow_alias) - writer.writeBool(2, this.allow_alias); - if (this.has_deprecated) - writer.writeBool(3, this.deprecated); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 2: - message.allow_alias = reader.readBool(); - break; - case 3: - message.deprecated = reader.readBool(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EnumOptions { - return EnumOptions.deserialize(bytes); - } - } - export class EnumValueOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - deprecated?: boolean; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 1, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 1) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - deprecated?: boolean; - uninterpreted_option?: ReturnType[]; - }): EnumValueOptions { - const message = new EnumValueOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - return message; - } - toObject() { - const data: { - deprecated?: boolean; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_deprecated) - writer.writeBool(1, this.deprecated); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EnumValueOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EnumValueOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.deprecated = reader.readBool(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EnumValueOptions { - return EnumValueOptions.deserialize(bytes); - } - } - export class ServiceOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - deprecated?: boolean; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 33, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 33) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - deprecated?: boolean; - uninterpreted_option?: ReturnType[]; - }): ServiceOptions { - const message = new ServiceOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - return message; - } - toObject() { - const data: { - deprecated?: boolean; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_deprecated) - writer.writeBool(33, this.deprecated); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ServiceOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ServiceOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 33: - message.deprecated = reader.readBool(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ServiceOptions { - return ServiceOptions.deserialize(bytes); - } - } - export class MethodOptions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - deprecated?: boolean; - idempotency_level?: MethodOptions.IdempotencyLevel; - uninterpreted_option: UninterpretedOption[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [999], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("deprecated" in data && data.deprecated != undefined) { - this.deprecated = data.deprecated; - } - if ("idempotency_level" in data && data.idempotency_level != undefined) { - this.idempotency_level = data.idempotency_level; - } - this.uninterpreted_option = data.uninterpreted_option; - } - } - get deprecated() { - return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean; - } - set deprecated(value: boolean) { - pb_1.Message.setField(this, 33, value); - } - get has_deprecated() { - return pb_1.Message.getField(this, 33) != null; - } - get idempotency_level() { - return pb_1.Message.getFieldWithDefault(this, 34, MethodOptions.IdempotencyLevel.IDEMPOTENCY_UNKNOWN) as MethodOptions.IdempotencyLevel; - } - set idempotency_level(value: MethodOptions.IdempotencyLevel) { - pb_1.Message.setField(this, 34, value); - } - get has_idempotency_level() { - return pb_1.Message.getField(this, 34) != null; - } - get uninterpreted_option() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption, 999) as UninterpretedOption[]; - } - set uninterpreted_option(value: UninterpretedOption[]) { - pb_1.Message.setRepeatedWrapperField(this, 999, value); - } - static fromObject(data: { - deprecated?: boolean; - idempotency_level?: MethodOptions.IdempotencyLevel; - uninterpreted_option?: ReturnType[]; - }): MethodOptions { - const message = new MethodOptions({ - uninterpreted_option: data.uninterpreted_option.map(item => UninterpretedOption.fromObject(item)) - }); - if (data.deprecated != null) { - message.deprecated = data.deprecated; - } - if (data.idempotency_level != null) { - message.idempotency_level = data.idempotency_level; - } - return message; - } - toObject() { - const data: { - deprecated?: boolean; - idempotency_level?: MethodOptions.IdempotencyLevel; - uninterpreted_option?: ReturnType[]; - } = {}; - if (this.deprecated != null) { - data.deprecated = this.deprecated; - } - if (this.idempotency_level != null) { - data.idempotency_level = this.idempotency_level; - } - if (this.uninterpreted_option != null) { - data.uninterpreted_option = this.uninterpreted_option.map((item: UninterpretedOption) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_deprecated) - writer.writeBool(33, this.deprecated); - if (this.has_idempotency_level) - writer.writeEnum(34, this.idempotency_level); - if (this.uninterpreted_option.length) - writer.writeRepeatedMessage(999, this.uninterpreted_option, (item: UninterpretedOption) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MethodOptions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MethodOptions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 33: - message.deprecated = reader.readBool(); - break; - case 34: - message.idempotency_level = reader.readEnum(); - break; - case 999: - reader.readMessage(message.uninterpreted_option, () => pb_1.Message.addToRepeatedWrapperField(message, 999, UninterpretedOption.deserialize(reader), UninterpretedOption)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MethodOptions { - return MethodOptions.deserialize(bytes); - } - } - export namespace MethodOptions { - export enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - export class UninterpretedOption extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name: UninterpretedOption.NamePart[]; - identifier_value?: string; - positive_int_value?: number; - negative_int_value?: number; - double_value?: number; - string_value?: Uint8Array; - aggregate_value?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.name = data.name; - if ("identifier_value" in data && data.identifier_value != undefined) { - this.identifier_value = data.identifier_value; - } - if ("positive_int_value" in data && data.positive_int_value != undefined) { - this.positive_int_value = data.positive_int_value; - } - if ("negative_int_value" in data && data.negative_int_value != undefined) { - this.negative_int_value = data.negative_int_value; - } - if ("double_value" in data && data.double_value != undefined) { - this.double_value = data.double_value; - } - if ("string_value" in data && data.string_value != undefined) { - this.string_value = data.string_value; - } - if ("aggregate_value" in data && data.aggregate_value != undefined) { - this.aggregate_value = data.aggregate_value; - } - } - } - get name() { - return pb_1.Message.getRepeatedWrapperField(this, UninterpretedOption.NamePart, 2) as UninterpretedOption.NamePart[]; - } - set name(value: UninterpretedOption.NamePart[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - get identifier_value() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set identifier_value(value: string) { - pb_1.Message.setField(this, 3, value); - } - get has_identifier_value() { - return pb_1.Message.getField(this, 3) != null; - } - get positive_int_value() { - return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; - } - set positive_int_value(value: number) { - pb_1.Message.setField(this, 4, value); - } - get has_positive_int_value() { - return pb_1.Message.getField(this, 4) != null; - } - get negative_int_value() { - return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; - } - set negative_int_value(value: number) { - pb_1.Message.setField(this, 5, value); - } - get has_negative_int_value() { - return pb_1.Message.getField(this, 5) != null; - } - get double_value() { - return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; - } - set double_value(value: number) { - pb_1.Message.setField(this, 6, value); - } - get has_double_value() { - return pb_1.Message.getField(this, 6) != null; - } - get string_value() { - return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; - } - set string_value(value: Uint8Array) { - pb_1.Message.setField(this, 7, value); - } - get has_string_value() { - return pb_1.Message.getField(this, 7) != null; - } - get aggregate_value() { - return pb_1.Message.getFieldWithDefault(this, 8, "") as string; - } - set aggregate_value(value: string) { - pb_1.Message.setField(this, 8, value); - } - get has_aggregate_value() { - return pb_1.Message.getField(this, 8) != null; - } - static fromObject(data: { - name?: ReturnType[]; - identifier_value?: string; - positive_int_value?: number; - negative_int_value?: number; - double_value?: number; - string_value?: Uint8Array; - aggregate_value?: string; - }): UninterpretedOption { - const message = new UninterpretedOption({ - name: data.name.map(item => UninterpretedOption.NamePart.fromObject(item)) - }); - if (data.identifier_value != null) { - message.identifier_value = data.identifier_value; - } - if (data.positive_int_value != null) { - message.positive_int_value = data.positive_int_value; - } - if (data.negative_int_value != null) { - message.negative_int_value = data.negative_int_value; - } - if (data.double_value != null) { - message.double_value = data.double_value; - } - if (data.string_value != null) { - message.string_value = data.string_value; - } - if (data.aggregate_value != null) { - message.aggregate_value = data.aggregate_value; - } - return message; - } - toObject() { - const data: { - name?: ReturnType[]; - identifier_value?: string; - positive_int_value?: number; - negative_int_value?: number; - double_value?: number; - string_value?: Uint8Array; - aggregate_value?: string; - } = {}; - if (this.name != null) { - data.name = this.name.map((item: UninterpretedOption.NamePart) => item.toObject()); - } - if (this.identifier_value != null) { - data.identifier_value = this.identifier_value; - } - if (this.positive_int_value != null) { - data.positive_int_value = this.positive_int_value; - } - if (this.negative_int_value != null) { - data.negative_int_value = this.negative_int_value; - } - if (this.double_value != null) { - data.double_value = this.double_value; - } - if (this.string_value != null) { - data.string_value = this.string_value; - } - if (this.aggregate_value != null) { - data.aggregate_value = this.aggregate_value; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.name.length) - writer.writeRepeatedMessage(2, this.name, (item: UninterpretedOption.NamePart) => item.serialize(writer)); - if (this.has_identifier_value && this.identifier_value.length) - writer.writeString(3, this.identifier_value); - if (this.has_positive_int_value) - writer.writeUint64(4, this.positive_int_value); - if (this.has_negative_int_value) - writer.writeInt64(5, this.negative_int_value); - if (this.has_double_value) - writer.writeDouble(6, this.double_value); - if (this.has_string_value && this.string_value.length) - writer.writeBytes(7, this.string_value); - if (this.has_aggregate_value && this.aggregate_value.length) - writer.writeString(8, this.aggregate_value); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UninterpretedOption { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UninterpretedOption(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 2: - reader.readMessage(message.name, () => pb_1.Message.addToRepeatedWrapperField(message, 2, UninterpretedOption.NamePart.deserialize(reader), UninterpretedOption.NamePart)); - break; - case 3: - message.identifier_value = reader.readString(); - break; - case 4: - message.positive_int_value = reader.readUint64(); - break; - case 5: - message.negative_int_value = reader.readInt64(); - break; - case 6: - message.double_value = reader.readDouble(); - break; - case 7: - message.string_value = reader.readBytes(); - break; - case 8: - message.aggregate_value = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): UninterpretedOption { - return UninterpretedOption.deserialize(bytes); - } - } - export namespace UninterpretedOption { - export class NamePart extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name_part: string; - is_extension: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.name_part = data.name_part; - this.is_extension = data.is_extension; - } - } - get name_part() { - return pb_1.Message.getField(this, 1) as string; - } - set name_part(value: string) { - pb_1.Message.setField(this, 1, value); - } - get has_name_part() { - return pb_1.Message.getField(this, 1) != null; - } - get is_extension() { - return pb_1.Message.getField(this, 2) as boolean; - } - set is_extension(value: boolean) { - pb_1.Message.setField(this, 2, value); - } - get has_is_extension() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - name_part?: string; - is_extension?: boolean; - }): NamePart { - const message = new NamePart({ - name_part: data.name_part, - is_extension: data.is_extension - }); - return message; - } - toObject() { - const data: { - name_part?: string; - is_extension?: boolean; - } = {}; - if (this.name_part != null) { - data.name_part = this.name_part; - } - if (this.is_extension != null) { - data.is_extension = this.is_extension; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name_part && this.name_part.length) - writer.writeString(1, this.name_part); - if (this.has_is_extension) - writer.writeBool(2, this.is_extension); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NamePart { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NamePart(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name_part = reader.readString(); - break; - case 2: - message.is_extension = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): NamePart { - return NamePart.deserialize(bytes); - } - } - } - export class SourceCodeInfo extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - location: SourceCodeInfo.Location[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.location = data.location; - } - } - get location() { - return pb_1.Message.getRepeatedWrapperField(this, SourceCodeInfo.Location, 1) as SourceCodeInfo.Location[]; - } - set location(value: SourceCodeInfo.Location[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - location?: ReturnType[]; - }): SourceCodeInfo { - const message = new SourceCodeInfo({ - location: data.location.map(item => SourceCodeInfo.Location.fromObject(item)) - }); - return message; - } - toObject() { - const data: { - location?: ReturnType[]; - } = {}; - if (this.location != null) { - data.location = this.location.map((item: SourceCodeInfo.Location) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.location.length) - writer.writeRepeatedMessage(1, this.location, (item: SourceCodeInfo.Location) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SourceCodeInfo { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SourceCodeInfo(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.location, () => pb_1.Message.addToRepeatedWrapperField(message, 1, SourceCodeInfo.Location.deserialize(reader), SourceCodeInfo.Location)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): SourceCodeInfo { - return SourceCodeInfo.deserialize(bytes); - } - } - export namespace SourceCodeInfo { - export class Location extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - path: number[]; - span: number[]; - leading_comments?: string; - trailing_comments?: string; - leading_detached_comments: string[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 6], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.path = data.path; - this.span = data.span; - if ("leading_comments" in data && data.leading_comments != undefined) { - this.leading_comments = data.leading_comments; - } - if ("trailing_comments" in data && data.trailing_comments != undefined) { - this.trailing_comments = data.trailing_comments; - } - this.leading_detached_comments = data.leading_detached_comments; - } - } - get path() { - return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; - } - set path(value: number[]) { - pb_1.Message.setField(this, 1, value); - } - get span() { - return pb_1.Message.getFieldWithDefault(this, 2, []) as number[]; - } - set span(value: number[]) { - pb_1.Message.setField(this, 2, value); - } - get leading_comments() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set leading_comments(value: string) { - pb_1.Message.setField(this, 3, value); - } - get has_leading_comments() { - return pb_1.Message.getField(this, 3) != null; - } - get trailing_comments() { - return pb_1.Message.getFieldWithDefault(this, 4, "") as string; - } - set trailing_comments(value: string) { - pb_1.Message.setField(this, 4, value); - } - get has_trailing_comments() { - return pb_1.Message.getField(this, 4) != null; - } - get leading_detached_comments() { - return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; - } - set leading_detached_comments(value: string[]) { - pb_1.Message.setField(this, 6, value); - } - static fromObject(data: { - path: number[]; - span: number[]; - leading_comments?: string; - trailing_comments?: string; - leading_detached_comments: string[]; - }): Location { - const message = new Location({ - path: data.path, - span: data.span, - leading_detached_comments: data.leading_detached_comments - }); - if (data.leading_comments != null) { - message.leading_comments = data.leading_comments; - } - if (data.trailing_comments != null) { - message.trailing_comments = data.trailing_comments; - } - return message; - } - toObject() { - const data: { - path: number[]; - span: number[]; - leading_comments?: string; - trailing_comments?: string; - leading_detached_comments: string[]; - } = { - path: this.path, - span: this.span, - leading_detached_comments: this.leading_detached_comments - }; - if (this.leading_comments != null) { - data.leading_comments = this.leading_comments; - } - if (this.trailing_comments != null) { - data.trailing_comments = this.trailing_comments; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.path.length) - writer.writePackedInt32(1, this.path); - if (this.span.length) - writer.writePackedInt32(2, this.span); - if (this.has_leading_comments && this.leading_comments.length) - writer.writeString(3, this.leading_comments); - if (this.has_trailing_comments && this.trailing_comments.length) - writer.writeString(4, this.trailing_comments); - if (this.leading_detached_comments.length) - writer.writeRepeatedString(6, this.leading_detached_comments); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Location { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Location(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.path = reader.readPackedInt32(); - break; - case 2: - message.span = reader.readPackedInt32(); - break; - case 3: - message.leading_comments = reader.readString(); - break; - case 4: - message.trailing_comments = reader.readString(); - break; - case 6: - pb_1.Message.addToRepeatedField(message, 6, reader.readString()); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Location { - return Location.deserialize(bytes); - } - } - } - export class GeneratedCodeInfo extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - annotation: GeneratedCodeInfo.Annotation[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.annotation = data.annotation; - } - } - get annotation() { - return pb_1.Message.getRepeatedWrapperField(this, GeneratedCodeInfo.Annotation, 1) as GeneratedCodeInfo.Annotation[]; - } - set annotation(value: GeneratedCodeInfo.Annotation[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - annotation?: ReturnType[]; - }): GeneratedCodeInfo { - const message = new GeneratedCodeInfo({ - annotation: data.annotation.map(item => GeneratedCodeInfo.Annotation.fromObject(item)) - }); - return message; - } - toObject() { - const data: { - annotation?: ReturnType[]; - } = {}; - if (this.annotation != null) { - data.annotation = this.annotation.map((item: GeneratedCodeInfo.Annotation) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.annotation.length) - writer.writeRepeatedMessage(1, this.annotation, (item: GeneratedCodeInfo.Annotation) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GeneratedCodeInfo { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GeneratedCodeInfo(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.annotation, () => pb_1.Message.addToRepeatedWrapperField(message, 1, GeneratedCodeInfo.Annotation.deserialize(reader), GeneratedCodeInfo.Annotation)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo { - return GeneratedCodeInfo.deserialize(bytes); - } - } - export namespace GeneratedCodeInfo { - export class Annotation extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - path: number[]; - source_file?: string; - begin?: number; - end?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - this.path = data.path; - if ("source_file" in data && data.source_file != undefined) { - this.source_file = data.source_file; - } - if ("begin" in data && data.begin != undefined) { - this.begin = data.begin; - } - if ("end" in data && data.end != undefined) { - this.end = data.end; - } - } - } - get path() { - return pb_1.Message.getFieldWithDefault(this, 1, []) as number[]; - } - set path(value: number[]) { - pb_1.Message.setField(this, 1, value); - } - get source_file() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set source_file(value: string) { - pb_1.Message.setField(this, 2, value); - } - get has_source_file() { - return pb_1.Message.getField(this, 2) != null; - } - get begin() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set begin(value: number) { - pb_1.Message.setField(this, 3, value); - } - get has_begin() { - return pb_1.Message.getField(this, 3) != null; - } - get end() { - return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; - } - set end(value: number) { - pb_1.Message.setField(this, 4, value); - } - get has_end() { - return pb_1.Message.getField(this, 4) != null; - } - static fromObject(data: { - path: number[]; - source_file?: string; - begin?: number; - end?: number; - }): Annotation { - const message = new Annotation({ - path: data.path - }); - if (data.source_file != null) { - message.source_file = data.source_file; - } - if (data.begin != null) { - message.begin = data.begin; - } - if (data.end != null) { - message.end = data.end; - } - return message; - } - toObject() { - const data: { - path: number[]; - source_file?: string; - begin?: number; - end?: number; - } = { - path: this.path - }; - if (this.source_file != null) { - data.source_file = this.source_file; - } - if (this.begin != null) { - data.begin = this.begin; - } - if (this.end != null) { - data.end = this.end; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.path.length) - writer.writePackedInt32(1, this.path); - if (this.has_source_file && this.source_file.length) - writer.writeString(2, this.source_file); - if (this.has_begin) - writer.writeInt32(3, this.begin); - if (this.has_end) - writer.writeInt32(4, this.end); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Annotation { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Annotation(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.path = reader.readPackedInt32(); - break; - case 2: - message.source_file = reader.readString(); - break; - case 3: - message.begin = reader.readInt32(); - break; - case 4: - message.end = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Annotation { - return Annotation.deserialize(bytes); - } - } - } -} diff --git a/src/proto/google/protobuf/duration.ts b/src/proto/google/protobuf/duration.ts deleted file mode 100644 index 0907867..0000000 --- a/src/proto/google/protobuf/duration.ts +++ /dev/null @@ -1,100 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: google/protobuf/duration.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class Duration extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - seconds?: number; - nanos?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("seconds" in data && data.seconds != undefined) { - this.seconds = data.seconds; - } - if ("nanos" in data && data.nanos != undefined) { - this.nanos = data.nanos; - } - } - } - get seconds() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set seconds(value: number) { - pb_1.Message.setField(this, 1, value); - } - get nanos() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set nanos(value: number) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - seconds?: number; - nanos?: number; - }): Duration { - const message = new Duration({}); - if (data.seconds != null) { - message.seconds = data.seconds; - } - if (data.nanos != null) { - message.nanos = data.nanos; - } - return message; - } - toObject() { - const data: { - seconds?: number; - nanos?: number; - } = {}; - if (this.seconds != null) { - data.seconds = this.seconds; - } - if (this.nanos != null) { - data.nanos = this.nanos; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.seconds != 0) - writer.writeInt64(1, this.seconds); - if (this.nanos != 0) - writer.writeInt32(2, this.nanos); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Duration { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Duration(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.seconds = reader.readInt64(); - break; - case 2: - message.nanos = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Duration { - return Duration.deserialize(bytes); - } - } -} diff --git a/src/proto/google/protobuf/timestamp.ts b/src/proto/google/protobuf/timestamp.ts deleted file mode 100644 index 27bfd0c..0000000 --- a/src/proto/google/protobuf/timestamp.ts +++ /dev/null @@ -1,100 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: google/protobuf/timestamp.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class Timestamp extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - seconds?: number; - nanos?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("seconds" in data && data.seconds != undefined) { - this.seconds = data.seconds; - } - if ("nanos" in data && data.nanos != undefined) { - this.nanos = data.nanos; - } - } - } - get seconds() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set seconds(value: number) { - pb_1.Message.setField(this, 1, value); - } - get nanos() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set nanos(value: number) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - seconds?: number; - nanos?: number; - }): Timestamp { - const message = new Timestamp({}); - if (data.seconds != null) { - message.seconds = data.seconds; - } - if (data.nanos != null) { - message.nanos = data.nanos; - } - return message; - } - toObject() { - const data: { - seconds?: number; - nanos?: number; - } = {}; - if (this.seconds != null) { - data.seconds = this.seconds; - } - if (this.nanos != null) { - data.nanos = this.nanos; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.seconds != 0) - writer.writeInt64(1, this.seconds); - if (this.nanos != 0) - writer.writeInt32(2, this.nanos); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timestamp { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Timestamp(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.seconds = reader.readInt64(); - break; - case 2: - message.nanos = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Timestamp { - return Timestamp.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/auction/v1beta1/genesis.ts b/src/proto/vulcanize/auction/v1beta1/genesis.ts deleted file mode 100644 index cdc73d4..0000000 --- a/src/proto/vulcanize/auction/v1beta1/genesis.ts +++ /dev/null @@ -1,105 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/auction/v1beta1/genesis.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./types"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.auction.v1beta1 { - export class GenesisState extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - params?: dependency_2.vulcanize.auction.v1beta1.Params; - auctions?: dependency_2.vulcanize.auction.v1beta1.Auction[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - if ("auctions" in data && data.auctions != undefined) { - this.auctions = data.auctions; - } - } - } - get params() { - return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.auction.v1beta1.Params, 1) as dependency_2.vulcanize.auction.v1beta1.Params; - } - set params(value: dependency_2.vulcanize.auction.v1beta1.Params) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_params() { - return pb_1.Message.getField(this, 1) != null; - } - get auctions() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.auction.v1beta1.Auction, 2) as dependency_2.vulcanize.auction.v1beta1.Auction[]; - } - set auctions(value: dependency_2.vulcanize.auction.v1beta1.Auction[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - static fromObject(data: { - params?: ReturnType; - auctions?: ReturnType[]; - }): GenesisState { - const message = new GenesisState({}); - if (data.params != null) { - message.params = dependency_2.vulcanize.auction.v1beta1.Params.fromObject(data.params); - } - if (data.auctions != null) { - message.auctions = data.auctions.map(item => dependency_2.vulcanize.auction.v1beta1.Auction.fromObject(item)); - } - return message; - } - toObject() { - const data: { - params?: ReturnType; - auctions?: ReturnType[]; - } = {}; - if (this.params != null) { - data.params = this.params.toObject(); - } - if (this.auctions != null) { - data.auctions = this.auctions.map((item: dependency_2.vulcanize.auction.v1beta1.Auction) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_params) - writer.writeMessage(1, this.params, () => this.params.serialize(writer)); - if (this.auctions.length) - writer.writeRepeatedMessage(2, this.auctions, (item: dependency_2.vulcanize.auction.v1beta1.Auction) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.auction.v1beta1.Params.deserialize(reader)); - break; - case 2: - reader.readMessage(message.auctions, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.auction.v1beta1.Auction.deserialize(reader), dependency_2.vulcanize.auction.v1beta1.Auction)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GenesisState { - return GenesisState.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/auction/v1beta1/query.ts b/src/proto/vulcanize/auction/v1beta1/query.ts deleted file mode 100644 index e87e058..0000000 --- a/src/proto/vulcanize/auction/v1beta1/query.ts +++ /dev/null @@ -1,1103 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/auction/v1beta1/query.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./../../../google/api/annotations"; -import * as dependency_3 from "./../../../cosmos/base/query/v1beta1/pagination"; -import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin"; -import * as dependency_5 from "./types"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.auction.v1beta1 { - export class AuctionsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - pagination?: ReturnType; - }): AuctionsRequest { - const message = new AuctionsRequest({}); - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - pagination?: ReturnType; - } = {}; - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_pagination) - writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionsRequest { - return AuctionsRequest.deserialize(bytes); - } - } - export class AuctionsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auctions?: dependency_5.vulcanize.auction.v1beta1.Auctions; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auctions" in data && data.auctions != undefined) { - this.auctions = data.auctions; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get auctions() { - return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auctions, 1) as dependency_5.vulcanize.auction.v1beta1.Auctions; - } - set auctions(value: dependency_5.vulcanize.auction.v1beta1.Auctions) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_auctions() { - return pb_1.Message.getField(this, 1) != null; - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - auctions?: ReturnType; - pagination?: ReturnType; - }): AuctionsResponse { - const message = new AuctionsResponse({}); - if (data.auctions != null) { - message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.fromObject(data.auctions); - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - auctions?: ReturnType; - pagination?: ReturnType; - } = {}; - if (this.auctions != null) { - data.auctions = this.auctions.toObject(); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_auctions) - writer.writeMessage(1, this.auctions, () => this.auctions.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auctions, () => message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.deserialize(reader)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionsResponse { - return AuctionsResponse.deserialize(bytes); - } - } - export class AuctionRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - id?: string; - }): AuctionRequest { - const message = new AuctionRequest({}); - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - id?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionRequest { - return AuctionRequest.deserialize(bytes); - } - } - export class AuctionResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction?: dependency_5.vulcanize.auction.v1beta1.Auction; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction" in data && data.auction != undefined) { - this.auction = data.auction; - } - } - } - get auction() { - return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auction, 1) as dependency_5.vulcanize.auction.v1beta1.Auction; - } - set auction(value: dependency_5.vulcanize.auction.v1beta1.Auction) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_auction() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - auction?: ReturnType; - }): AuctionResponse { - const message = new AuctionResponse({}); - if (data.auction != null) { - message.auction = dependency_5.vulcanize.auction.v1beta1.Auction.fromObject(data.auction); - } - return message; - } - toObject() { - const data: { - auction?: ReturnType; - } = {}; - if (this.auction != null) { - data.auction = this.auction.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_auction) - writer.writeMessage(1, this.auction, () => this.auction.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auction, () => message.auction = dependency_5.vulcanize.auction.v1beta1.Auction.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionResponse { - return AuctionResponse.deserialize(bytes); - } - } - export class BidRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction_id?: string; - bidder?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - if ("bidder" in data && data.bidder != undefined) { - this.bidder = data.bidder; - } - } - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get bidder() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set bidder(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - auction_id?: string; - bidder?: string; - }): BidRequest { - const message = new BidRequest({}); - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - if (data.bidder != null) { - message.bidder = data.bidder; - } - return message; - } - toObject() { - const data: { - auction_id?: string; - bidder?: string; - } = {}; - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - if (this.bidder != null) { - data.bidder = this.bidder; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auction_id.length) - writer.writeString(1, this.auction_id); - if (this.bidder.length) - writer.writeString(2, this.bidder); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.auction_id = reader.readString(); - break; - case 2: - message.bidder = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BidRequest { - return BidRequest.deserialize(bytes); - } - } - export class BidResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bid?: dependency_5.vulcanize.auction.v1beta1.Bid; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bid" in data && data.bid != undefined) { - this.bid = data.bid; - } - } - } - get bid() { - return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Bid, 1) as dependency_5.vulcanize.auction.v1beta1.Bid; - } - set bid(value: dependency_5.vulcanize.auction.v1beta1.Bid) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_bid() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - bid?: ReturnType; - }): BidResponse { - const message = new BidResponse({}); - if (data.bid != null) { - message.bid = dependency_5.vulcanize.auction.v1beta1.Bid.fromObject(data.bid); - } - return message; - } - toObject() { - const data: { - bid?: ReturnType; - } = {}; - if (this.bid != null) { - data.bid = this.bid.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_bid) - writer.writeMessage(1, this.bid, () => this.bid.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.bid, () => message.bid = dependency_5.vulcanize.auction.v1beta1.Bid.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BidResponse { - return BidResponse.deserialize(bytes); - } - } - export class BidsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction_id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - } - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - auction_id?: string; - }): BidsRequest { - const message = new BidsRequest({}); - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - return message; - } - toObject() { - const data: { - auction_id?: string; - } = {}; - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auction_id.length) - writer.writeString(1, this.auction_id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.auction_id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BidsRequest { - return BidsRequest.deserialize(bytes); - } - } - export class BidsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bids?: dependency_5.vulcanize.auction.v1beta1.Bid[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bids" in data && data.bids != undefined) { - this.bids = data.bids; - } - } - } - get bids() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Bid, 1) as dependency_5.vulcanize.auction.v1beta1.Bid[]; - } - set bids(value: dependency_5.vulcanize.auction.v1beta1.Bid[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - bids?: ReturnType[]; - }): BidsResponse { - const message = new BidsResponse({}); - if (data.bids != null) { - message.bids = data.bids.map(item => dependency_5.vulcanize.auction.v1beta1.Bid.fromObject(item)); - } - return message; - } - toObject() { - const data: { - bids?: ReturnType[]; - } = {}; - if (this.bids != null) { - data.bids = this.bids.map((item: dependency_5.vulcanize.auction.v1beta1.Bid) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.bids.length) - writer.writeRepeatedMessage(1, this.bids, (item: dependency_5.vulcanize.auction.v1beta1.Bid) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.bids, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.vulcanize.auction.v1beta1.Bid.deserialize(reader), dependency_5.vulcanize.auction.v1beta1.Bid)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BidsResponse { - return BidsResponse.deserialize(bytes); - } - } - export class AuctionsByBidderRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bidder_address?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bidder_address" in data && data.bidder_address != undefined) { - this.bidder_address = data.bidder_address; - } - } - } - get bidder_address() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set bidder_address(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - bidder_address?: string; - }): AuctionsByBidderRequest { - const message = new AuctionsByBidderRequest({}); - if (data.bidder_address != null) { - message.bidder_address = data.bidder_address; - } - return message; - } - toObject() { - const data: { - bidder_address?: string; - } = {}; - if (this.bidder_address != null) { - data.bidder_address = this.bidder_address; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.bidder_address.length) - writer.writeString(1, this.bidder_address); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByBidderRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByBidderRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.bidder_address = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionsByBidderRequest { - return AuctionsByBidderRequest.deserialize(bytes); - } - } - export class AuctionsByBidderResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auctions?: dependency_5.vulcanize.auction.v1beta1.Auctions; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auctions" in data && data.auctions != undefined) { - this.auctions = data.auctions; - } - } - } - get auctions() { - return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auctions, 1) as dependency_5.vulcanize.auction.v1beta1.Auctions; - } - set auctions(value: dependency_5.vulcanize.auction.v1beta1.Auctions) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_auctions() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - auctions?: ReturnType; - }): AuctionsByBidderResponse { - const message = new AuctionsByBidderResponse({}); - if (data.auctions != null) { - message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.fromObject(data.auctions); - } - return message; - } - toObject() { - const data: { - auctions?: ReturnType; - } = {}; - if (this.auctions != null) { - data.auctions = this.auctions.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_auctions) - writer.writeMessage(1, this.auctions, () => this.auctions.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByBidderResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByBidderResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auctions, () => message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionsByBidderResponse { - return AuctionsByBidderResponse.deserialize(bytes); - } - } - export class AuctionsByOwnerRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - owner_address?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("owner_address" in data && data.owner_address != undefined) { - this.owner_address = data.owner_address; - } - } - } - get owner_address() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set owner_address(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - owner_address?: string; - }): AuctionsByOwnerRequest { - const message = new AuctionsByOwnerRequest({}); - if (data.owner_address != null) { - message.owner_address = data.owner_address; - } - return message; - } - toObject() { - const data: { - owner_address?: string; - } = {}; - if (this.owner_address != null) { - data.owner_address = this.owner_address; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.owner_address.length) - writer.writeString(1, this.owner_address); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByOwnerRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByOwnerRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.owner_address = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionsByOwnerRequest { - return AuctionsByOwnerRequest.deserialize(bytes); - } - } - export class AuctionsByOwnerResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auctions?: dependency_5.vulcanize.auction.v1beta1.Auctions; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auctions" in data && data.auctions != undefined) { - this.auctions = data.auctions; - } - } - } - get auctions() { - return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auctions, 1) as dependency_5.vulcanize.auction.v1beta1.Auctions; - } - set auctions(value: dependency_5.vulcanize.auction.v1beta1.Auctions) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_auctions() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - auctions?: ReturnType; - }): AuctionsByOwnerResponse { - const message = new AuctionsByOwnerResponse({}); - if (data.auctions != null) { - message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.fromObject(data.auctions); - } - return message; - } - toObject() { - const data: { - auctions?: ReturnType; - } = {}; - if (this.auctions != null) { - data.auctions = this.auctions.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_auctions) - writer.writeMessage(1, this.auctions, () => this.auctions.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByOwnerResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByOwnerResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auctions, () => message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionsByOwnerResponse { - return AuctionsByOwnerResponse.deserialize(bytes); - } - } - export class QueryParamsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): QueryParamsRequest { - const message = new QueryParamsRequest({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { - return QueryParamsRequest.deserialize(bytes); - } - } - export class QueryParamsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - params?: dependency_5.vulcanize.auction.v1beta1.Params; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - } - } - get params() { - return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Params, 1) as dependency_5.vulcanize.auction.v1beta1.Params; - } - set params(value: dependency_5.vulcanize.auction.v1beta1.Params) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_params() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - params?: ReturnType; - }): QueryParamsResponse { - const message = new QueryParamsResponse({}); - if (data.params != null) { - message.params = dependency_5.vulcanize.auction.v1beta1.Params.fromObject(data.params); - } - return message; - } - toObject() { - const data: { - params?: ReturnType; - } = {}; - if (this.params != null) { - data.params = this.params.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_params) - writer.writeMessage(1, this.params, () => this.params.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.params, () => message.params = dependency_5.vulcanize.auction.v1beta1.Params.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { - return QueryParamsResponse.deserialize(bytes); - } - } - export class BalanceRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): BalanceRequest { - const message = new BalanceRequest({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BalanceRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BalanceRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BalanceRequest { - return BalanceRequest.deserialize(bytes); - } - } - export class BalanceResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - balance?: dependency_4.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("balance" in data && data.balance != undefined) { - this.balance = data.balance; - } - } - } - get balance() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin[]; - } - set balance(value: dependency_4.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - balance?: ReturnType[]; - }): BalanceResponse { - const message = new BalanceResponse({}); - if (data.balance != null) { - message.balance = data.balance.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - balance?: ReturnType[]; - } = {}; - if (this.balance != null) { - data.balance = this.balance.map((item: dependency_4.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.balance.length) - writer.writeRepeatedMessage(1, this.balance, (item: dependency_4.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BalanceResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BalanceResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BalanceResponse { - return BalanceResponse.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/auction/v1beta1/tx.ts b/src/proto/vulcanize/auction/v1beta1/tx.ts deleted file mode 100644 index d99edf2..0000000 --- a/src/proto/vulcanize/auction/v1beta1/tx.ts +++ /dev/null @@ -1,647 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/auction/v1beta1/tx.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./../../../google/protobuf/duration"; -import * as dependency_3 from "./../../../cosmos/base/v1beta1/coin"; -import * as dependency_4 from "./types"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.auction.v1beta1 { - export class MsgCreateAuction extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - commits_duration?: dependency_2.google.protobuf.Duration; - reveals_duration?: dependency_2.google.protobuf.Duration; - commit_fee?: dependency_3.cosmos.base.v1beta1.Coin; - reveal_fee?: dependency_3.cosmos.base.v1beta1.Coin; - minimum_bid?: dependency_3.cosmos.base.v1beta1.Coin; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("commits_duration" in data && data.commits_duration != undefined) { - this.commits_duration = data.commits_duration; - } - if ("reveals_duration" in data && data.reveals_duration != undefined) { - this.reveals_duration = data.reveals_duration; - } - if ("commit_fee" in data && data.commit_fee != undefined) { - this.commit_fee = data.commit_fee; - } - if ("reveal_fee" in data && data.reveal_fee != undefined) { - this.reveal_fee = data.reveal_fee; - } - if ("minimum_bid" in data && data.minimum_bid != undefined) { - this.minimum_bid = data.minimum_bid; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get commits_duration() { - return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 1) as dependency_2.google.protobuf.Duration; - } - set commits_duration(value: dependency_2.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_commits_duration() { - return pb_1.Message.getField(this, 1) != null; - } - get reveals_duration() { - return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration; - } - set reveals_duration(value: dependency_2.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_reveals_duration() { - return pb_1.Message.getField(this, 2) != null; - } - get commit_fee() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 3) as dependency_3.cosmos.base.v1beta1.Coin; - } - set commit_fee(value: dependency_3.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_commit_fee() { - return pb_1.Message.getField(this, 3) != null; - } - get reveal_fee() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 4) as dependency_3.cosmos.base.v1beta1.Coin; - } - set reveal_fee(value: dependency_3.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_reveal_fee() { - return pb_1.Message.getField(this, 4) != null; - } - get minimum_bid() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 5) as dependency_3.cosmos.base.v1beta1.Coin; - } - set minimum_bid(value: dependency_3.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 5, value); - } - get has_minimum_bid() { - return pb_1.Message.getField(this, 5) != null; - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 6, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 6, value); - } - static fromObject(data: { - commits_duration?: ReturnType; - reveals_duration?: ReturnType; - commit_fee?: ReturnType; - reveal_fee?: ReturnType; - minimum_bid?: ReturnType; - signer?: string; - }): MsgCreateAuction { - const message = new MsgCreateAuction({}); - if (data.commits_duration != null) { - message.commits_duration = dependency_2.google.protobuf.Duration.fromObject(data.commits_duration); - } - if (data.reveals_duration != null) { - message.reveals_duration = dependency_2.google.protobuf.Duration.fromObject(data.reveals_duration); - } - if (data.commit_fee != null) { - message.commit_fee = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee); - } - if (data.reveal_fee != null) { - message.reveal_fee = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee); - } - if (data.minimum_bid != null) { - message.minimum_bid = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.minimum_bid); - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - commits_duration?: ReturnType; - reveals_duration?: ReturnType; - commit_fee?: ReturnType; - reveal_fee?: ReturnType; - minimum_bid?: ReturnType; - signer?: string; - } = {}; - if (this.commits_duration != null) { - data.commits_duration = this.commits_duration.toObject(); - } - if (this.reveals_duration != null) { - data.reveals_duration = this.reveals_duration.toObject(); - } - if (this.commit_fee != null) { - data.commit_fee = this.commit_fee.toObject(); - } - if (this.reveal_fee != null) { - data.reveal_fee = this.reveal_fee.toObject(); - } - if (this.minimum_bid != null) { - data.minimum_bid = this.minimum_bid.toObject(); - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_commits_duration) - writer.writeMessage(1, this.commits_duration, () => this.commits_duration.serialize(writer)); - if (this.has_reveals_duration) - writer.writeMessage(2, this.reveals_duration, () => this.reveals_duration.serialize(writer)); - if (this.has_commit_fee) - writer.writeMessage(3, this.commit_fee, () => this.commit_fee.serialize(writer)); - if (this.has_reveal_fee) - writer.writeMessage(4, this.reveal_fee, () => this.reveal_fee.serialize(writer)); - if (this.has_minimum_bid) - writer.writeMessage(5, this.minimum_bid, () => this.minimum_bid.serialize(writer)); - if (this.signer.length) - writer.writeString(6, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateAuction { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateAuction(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.commits_duration, () => message.commits_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); - break; - case 2: - reader.readMessage(message.reveals_duration, () => message.reveals_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); - break; - case 3: - reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 4: - reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 5: - reader.readMessage(message.minimum_bid, () => message.minimum_bid = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 6: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCreateAuction { - return MsgCreateAuction.deserialize(bytes); - } - } - export class MsgCreateAuctionResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction?: dependency_4.vulcanize.auction.v1beta1.Auction; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction" in data && data.auction != undefined) { - this.auction = data.auction; - } - } - } - get auction() { - return pb_1.Message.getWrapperField(this, dependency_4.vulcanize.auction.v1beta1.Auction, 1) as dependency_4.vulcanize.auction.v1beta1.Auction; - } - set auction(value: dependency_4.vulcanize.auction.v1beta1.Auction) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_auction() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - auction?: ReturnType; - }): MsgCreateAuctionResponse { - const message = new MsgCreateAuctionResponse({}); - if (data.auction != null) { - message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.fromObject(data.auction); - } - return message; - } - toObject() { - const data: { - auction?: ReturnType; - } = {}; - if (this.auction != null) { - data.auction = this.auction.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_auction) - writer.writeMessage(1, this.auction, () => this.auction.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateAuctionResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateAuctionResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auction, () => message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCreateAuctionResponse { - return MsgCreateAuctionResponse.deserialize(bytes); - } - } - export class MsgCommitBid extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction_id?: string; - commit_hash?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - if ("commit_hash" in data && data.commit_hash != undefined) { - this.commit_hash = data.commit_hash; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get commit_hash() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set commit_hash(value: string) { - pb_1.Message.setField(this, 2, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - auction_id?: string; - commit_hash?: string; - signer?: string; - }): MsgCommitBid { - const message = new MsgCommitBid({}); - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - if (data.commit_hash != null) { - message.commit_hash = data.commit_hash; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - auction_id?: string; - commit_hash?: string; - signer?: string; - } = {}; - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - if (this.commit_hash != null) { - data.commit_hash = this.commit_hash; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auction_id.length) - writer.writeString(1, this.auction_id); - if (this.commit_hash.length) - writer.writeString(2, this.commit_hash); - if (this.signer.length) - writer.writeString(3, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommitBid { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCommitBid(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.auction_id = reader.readString(); - break; - case 2: - message.commit_hash = reader.readString(); - break; - case 3: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCommitBid { - return MsgCommitBid.deserialize(bytes); - } - } - export class MsgRevealBid extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction_id?: string; - reveal?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - if ("reveal" in data && data.reveal != undefined) { - this.reveal = data.reveal; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get reveal() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set reveal(value: string) { - pb_1.Message.setField(this, 2, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - auction_id?: string; - reveal?: string; - signer?: string; - }): MsgRevealBid { - const message = new MsgRevealBid({}); - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - if (data.reveal != null) { - message.reveal = data.reveal; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - auction_id?: string; - reveal?: string; - signer?: string; - } = {}; - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - if (this.reveal != null) { - data.reveal = this.reveal; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auction_id.length) - writer.writeString(1, this.auction_id); - if (this.reveal.length) - writer.writeString(2, this.reveal); - if (this.signer.length) - writer.writeString(3, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevealBid { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevealBid(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.auction_id = reader.readString(); - break; - case 2: - message.reveal = reader.readString(); - break; - case 3: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgRevealBid { - return MsgRevealBid.deserialize(bytes); - } - } - export class MsgCommitBidResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bid?: dependency_4.vulcanize.auction.v1beta1.Bid; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bid" in data && data.bid != undefined) { - this.bid = data.bid; - } - } - } - get bid() { - return pb_1.Message.getWrapperField(this, dependency_4.vulcanize.auction.v1beta1.Bid, 1) as dependency_4.vulcanize.auction.v1beta1.Bid; - } - set bid(value: dependency_4.vulcanize.auction.v1beta1.Bid) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_bid() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - bid?: ReturnType; - }): MsgCommitBidResponse { - const message = new MsgCommitBidResponse({}); - if (data.bid != null) { - message.bid = dependency_4.vulcanize.auction.v1beta1.Bid.fromObject(data.bid); - } - return message; - } - toObject() { - const data: { - bid?: ReturnType; - } = {}; - if (this.bid != null) { - data.bid = this.bid.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_bid) - writer.writeMessage(1, this.bid, () => this.bid.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommitBidResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCommitBidResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.bid, () => message.bid = dependency_4.vulcanize.auction.v1beta1.Bid.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCommitBidResponse { - return MsgCommitBidResponse.deserialize(bytes); - } - } - export class MsgRevealBidResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction?: dependency_4.vulcanize.auction.v1beta1.Auction; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction" in data && data.auction != undefined) { - this.auction = data.auction; - } - } - } - get auction() { - return pb_1.Message.getWrapperField(this, dependency_4.vulcanize.auction.v1beta1.Auction, 1) as dependency_4.vulcanize.auction.v1beta1.Auction; - } - set auction(value: dependency_4.vulcanize.auction.v1beta1.Auction) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_auction() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - auction?: ReturnType; - }): MsgRevealBidResponse { - const message = new MsgRevealBidResponse({}); - if (data.auction != null) { - message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.fromObject(data.auction); - } - return message; - } - toObject() { - const data: { - auction?: ReturnType; - } = {}; - if (this.auction != null) { - data.auction = this.auction.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_auction) - writer.writeMessage(1, this.auction, () => this.auction.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevealBidResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevealBidResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auction, () => message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgRevealBidResponse { - return MsgRevealBidResponse.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/auction/v1beta1/types.ts b/src/proto/vulcanize/auction/v1beta1/types.ts deleted file mode 100644 index 463f420..0000000 --- a/src/proto/vulcanize/auction/v1beta1/types.ts +++ /dev/null @@ -1,865 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/auction/v1beta1/types.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./../../../google/protobuf/duration"; -import * as dependency_3 from "./../../../google/protobuf/timestamp"; -import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.auction.v1beta1 { - export class Params extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - commits_duration?: dependency_2.google.protobuf.Duration; - reveals_duration?: dependency_2.google.protobuf.Duration; - commit_fee?: dependency_4.cosmos.base.v1beta1.Coin; - reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin; - minimum_bid?: dependency_4.cosmos.base.v1beta1.Coin; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("commits_duration" in data && data.commits_duration != undefined) { - this.commits_duration = data.commits_duration; - } - if ("reveals_duration" in data && data.reveals_duration != undefined) { - this.reveals_duration = data.reveals_duration; - } - if ("commit_fee" in data && data.commit_fee != undefined) { - this.commit_fee = data.commit_fee; - } - if ("reveal_fee" in data && data.reveal_fee != undefined) { - this.reveal_fee = data.reveal_fee; - } - if ("minimum_bid" in data && data.minimum_bid != undefined) { - this.minimum_bid = data.minimum_bid; - } - } - } - get commits_duration() { - return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 1) as dependency_2.google.protobuf.Duration; - } - set commits_duration(value: dependency_2.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_commits_duration() { - return pb_1.Message.getField(this, 1) != null; - } - get reveals_duration() { - return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration; - } - set reveals_duration(value: dependency_2.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_reveals_duration() { - return pb_1.Message.getField(this, 2) != null; - } - get commit_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 3) as dependency_4.cosmos.base.v1beta1.Coin; - } - set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_commit_fee() { - return pb_1.Message.getField(this, 3) != null; - } - get reveal_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 4) as dependency_4.cosmos.base.v1beta1.Coin; - } - set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_reveal_fee() { - return pb_1.Message.getField(this, 4) != null; - } - get minimum_bid() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 5) as dependency_4.cosmos.base.v1beta1.Coin; - } - set minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 5, value); - } - get has_minimum_bid() { - return pb_1.Message.getField(this, 5) != null; - } - static fromObject(data: { - commits_duration?: ReturnType; - reveals_duration?: ReturnType; - commit_fee?: ReturnType; - reveal_fee?: ReturnType; - minimum_bid?: ReturnType; - }): Params { - const message = new Params({}); - if (data.commits_duration != null) { - message.commits_duration = dependency_2.google.protobuf.Duration.fromObject(data.commits_duration); - } - if (data.reveals_duration != null) { - message.reveals_duration = dependency_2.google.protobuf.Duration.fromObject(data.reveals_duration); - } - if (data.commit_fee != null) { - message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee); - } - if (data.reveal_fee != null) { - message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee); - } - if (data.minimum_bid != null) { - message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.minimum_bid); - } - return message; - } - toObject() { - const data: { - commits_duration?: ReturnType; - reveals_duration?: ReturnType; - commit_fee?: ReturnType; - reveal_fee?: ReturnType; - minimum_bid?: ReturnType; - } = {}; - if (this.commits_duration != null) { - data.commits_duration = this.commits_duration.toObject(); - } - if (this.reveals_duration != null) { - data.reveals_duration = this.reveals_duration.toObject(); - } - if (this.commit_fee != null) { - data.commit_fee = this.commit_fee.toObject(); - } - if (this.reveal_fee != null) { - data.reveal_fee = this.reveal_fee.toObject(); - } - if (this.minimum_bid != null) { - data.minimum_bid = this.minimum_bid.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_commits_duration) - writer.writeMessage(1, this.commits_duration, () => this.commits_duration.serialize(writer)); - if (this.has_reveals_duration) - writer.writeMessage(2, this.reveals_duration, () => this.reveals_duration.serialize(writer)); - if (this.has_commit_fee) - writer.writeMessage(3, this.commit_fee, () => this.commit_fee.serialize(writer)); - if (this.has_reveal_fee) - writer.writeMessage(4, this.reveal_fee, () => this.reveal_fee.serialize(writer)); - if (this.has_minimum_bid) - writer.writeMessage(5, this.minimum_bid, () => this.minimum_bid.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.commits_duration, () => message.commits_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); - break; - case 2: - reader.readMessage(message.reveals_duration, () => message.reveals_duration = dependency_2.google.protobuf.Duration.deserialize(reader)); - break; - case 3: - reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 4: - reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 5: - reader.readMessage(message.minimum_bid, () => message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Params { - return Params.deserialize(bytes); - } - } - export class Auction extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - status?: string; - owner_address?: string; - create_time?: dependency_3.google.protobuf.Timestamp; - commits_end_time?: dependency_3.google.protobuf.Timestamp; - reveals_end_time?: dependency_3.google.protobuf.Timestamp; - commit_fee?: dependency_4.cosmos.base.v1beta1.Coin; - reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin; - minimum_bid?: dependency_4.cosmos.base.v1beta1.Coin; - winner_address?: string; - winning_bid?: dependency_4.cosmos.base.v1beta1.Coin; - winning_price?: dependency_4.cosmos.base.v1beta1.Coin; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("status" in data && data.status != undefined) { - this.status = data.status; - } - if ("owner_address" in data && data.owner_address != undefined) { - this.owner_address = data.owner_address; - } - if ("create_time" in data && data.create_time != undefined) { - this.create_time = data.create_time; - } - if ("commits_end_time" in data && data.commits_end_time != undefined) { - this.commits_end_time = data.commits_end_time; - } - if ("reveals_end_time" in data && data.reveals_end_time != undefined) { - this.reveals_end_time = data.reveals_end_time; - } - if ("commit_fee" in data && data.commit_fee != undefined) { - this.commit_fee = data.commit_fee; - } - if ("reveal_fee" in data && data.reveal_fee != undefined) { - this.reveal_fee = data.reveal_fee; - } - if ("minimum_bid" in data && data.minimum_bid != undefined) { - this.minimum_bid = data.minimum_bid; - } - if ("winner_address" in data && data.winner_address != undefined) { - this.winner_address = data.winner_address; - } - if ("winning_bid" in data && data.winning_bid != undefined) { - this.winning_bid = data.winning_bid; - } - if ("winning_price" in data && data.winning_price != undefined) { - this.winning_price = data.winning_price; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get status() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set status(value: string) { - pb_1.Message.setField(this, 2, value); - } - get owner_address() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set owner_address(value: string) { - pb_1.Message.setField(this, 3, value); - } - get create_time() { - return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 4) as dependency_3.google.protobuf.Timestamp; - } - set create_time(value: dependency_3.google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_create_time() { - return pb_1.Message.getField(this, 4) != null; - } - get commits_end_time() { - return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp; - } - set commits_end_time(value: dependency_3.google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 5, value); - } - get has_commits_end_time() { - return pb_1.Message.getField(this, 5) != null; - } - get reveals_end_time() { - return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 6) as dependency_3.google.protobuf.Timestamp; - } - set reveals_end_time(value: dependency_3.google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 6, value); - } - get has_reveals_end_time() { - return pb_1.Message.getField(this, 6) != null; - } - get commit_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 7) as dependency_4.cosmos.base.v1beta1.Coin; - } - set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 7, value); - } - get has_commit_fee() { - return pb_1.Message.getField(this, 7) != null; - } - get reveal_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 8) as dependency_4.cosmos.base.v1beta1.Coin; - } - set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 8, value); - } - get has_reveal_fee() { - return pb_1.Message.getField(this, 8) != null; - } - get minimum_bid() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9) as dependency_4.cosmos.base.v1beta1.Coin; - } - set minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 9, value); - } - get has_minimum_bid() { - return pb_1.Message.getField(this, 9) != null; - } - get winner_address() { - return pb_1.Message.getFieldWithDefault(this, 10, "") as string; - } - set winner_address(value: string) { - pb_1.Message.setField(this, 10, value); - } - get winning_bid() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 11) as dependency_4.cosmos.base.v1beta1.Coin; - } - set winning_bid(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 11, value); - } - get has_winning_bid() { - return pb_1.Message.getField(this, 11) != null; - } - get winning_price() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 12) as dependency_4.cosmos.base.v1beta1.Coin; - } - set winning_price(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 12, value); - } - get has_winning_price() { - return pb_1.Message.getField(this, 12) != null; - } - static fromObject(data: { - id?: string; - status?: string; - owner_address?: string; - create_time?: ReturnType; - commits_end_time?: ReturnType; - reveals_end_time?: ReturnType; - commit_fee?: ReturnType; - reveal_fee?: ReturnType; - minimum_bid?: ReturnType; - winner_address?: string; - winning_bid?: ReturnType; - winning_price?: ReturnType; - }): Auction { - const message = new Auction({}); - if (data.id != null) { - message.id = data.id; - } - if (data.status != null) { - message.status = data.status; - } - if (data.owner_address != null) { - message.owner_address = data.owner_address; - } - if (data.create_time != null) { - message.create_time = dependency_3.google.protobuf.Timestamp.fromObject(data.create_time); - } - if (data.commits_end_time != null) { - message.commits_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.commits_end_time); - } - if (data.reveals_end_time != null) { - message.reveals_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.reveals_end_time); - } - if (data.commit_fee != null) { - message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee); - } - if (data.reveal_fee != null) { - message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee); - } - if (data.minimum_bid != null) { - message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.minimum_bid); - } - if (data.winner_address != null) { - message.winner_address = data.winner_address; - } - if (data.winning_bid != null) { - message.winning_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.winning_bid); - } - if (data.winning_price != null) { - message.winning_price = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.winning_price); - } - return message; - } - toObject() { - const data: { - id?: string; - status?: string; - owner_address?: string; - create_time?: ReturnType; - commits_end_time?: ReturnType; - reveals_end_time?: ReturnType; - commit_fee?: ReturnType; - reveal_fee?: ReturnType; - minimum_bid?: ReturnType; - winner_address?: string; - winning_bid?: ReturnType; - winning_price?: ReturnType; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.status != null) { - data.status = this.status; - } - if (this.owner_address != null) { - data.owner_address = this.owner_address; - } - if (this.create_time != null) { - data.create_time = this.create_time.toObject(); - } - if (this.commits_end_time != null) { - data.commits_end_time = this.commits_end_time.toObject(); - } - if (this.reveals_end_time != null) { - data.reveals_end_time = this.reveals_end_time.toObject(); - } - if (this.commit_fee != null) { - data.commit_fee = this.commit_fee.toObject(); - } - if (this.reveal_fee != null) { - data.reveal_fee = this.reveal_fee.toObject(); - } - if (this.minimum_bid != null) { - data.minimum_bid = this.minimum_bid.toObject(); - } - if (this.winner_address != null) { - data.winner_address = this.winner_address; - } - if (this.winning_bid != null) { - data.winning_bid = this.winning_bid.toObject(); - } - if (this.winning_price != null) { - data.winning_price = this.winning_price.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.status.length) - writer.writeString(2, this.status); - if (this.owner_address.length) - writer.writeString(3, this.owner_address); - if (this.has_create_time) - writer.writeMessage(4, this.create_time, () => this.create_time.serialize(writer)); - if (this.has_commits_end_time) - writer.writeMessage(5, this.commits_end_time, () => this.commits_end_time.serialize(writer)); - if (this.has_reveals_end_time) - writer.writeMessage(6, this.reveals_end_time, () => this.reveals_end_time.serialize(writer)); - if (this.has_commit_fee) - writer.writeMessage(7, this.commit_fee, () => this.commit_fee.serialize(writer)); - if (this.has_reveal_fee) - writer.writeMessage(8, this.reveal_fee, () => this.reveal_fee.serialize(writer)); - if (this.has_minimum_bid) - writer.writeMessage(9, this.minimum_bid, () => this.minimum_bid.serialize(writer)); - if (this.winner_address.length) - writer.writeString(10, this.winner_address); - if (this.has_winning_bid) - writer.writeMessage(11, this.winning_bid, () => this.winning_bid.serialize(writer)); - if (this.has_winning_price) - writer.writeMessage(12, this.winning_price, () => this.winning_price.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Auction { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Auction(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.status = reader.readString(); - break; - case 3: - message.owner_address = reader.readString(); - break; - case 4: - reader.readMessage(message.create_time, () => message.create_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); - break; - case 5: - reader.readMessage(message.commits_end_time, () => message.commits_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); - break; - case 6: - reader.readMessage(message.reveals_end_time, () => message.reveals_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); - break; - case 7: - reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 8: - reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 9: - reader.readMessage(message.minimum_bid, () => message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 10: - message.winner_address = reader.readString(); - break; - case 11: - reader.readMessage(message.winning_bid, () => message.winning_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 12: - reader.readMessage(message.winning_price, () => message.winning_price = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Auction { - return Auction.deserialize(bytes); - } - } - export class Auctions extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auctions?: Auction[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auctions" in data && data.auctions != undefined) { - this.auctions = data.auctions; - } - } - } - get auctions() { - return pb_1.Message.getRepeatedWrapperField(this, Auction, 1) as Auction[]; - } - set auctions(value: Auction[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - auctions?: ReturnType[]; - }): Auctions { - const message = new Auctions({}); - if (data.auctions != null) { - message.auctions = data.auctions.map(item => Auction.fromObject(item)); - } - return message; - } - toObject() { - const data: { - auctions?: ReturnType[]; - } = {}; - if (this.auctions != null) { - data.auctions = this.auctions.map((item: Auction) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auctions.length) - writer.writeRepeatedMessage(1, this.auctions, (item: Auction) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Auctions { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Auctions(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.auctions, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Auction.deserialize(reader), Auction)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Auctions { - return Auctions.deserialize(bytes); - } - } - export class Bid extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction_id?: string; - bidder_address?: string; - status?: string; - commit_hash?: string; - commit_time?: dependency_3.google.protobuf.Timestamp; - commit_fee?: dependency_4.cosmos.base.v1beta1.Coin; - reveal_time?: dependency_3.google.protobuf.Timestamp; - reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin; - bid_amount?: dependency_4.cosmos.base.v1beta1.Coin; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - if ("bidder_address" in data && data.bidder_address != undefined) { - this.bidder_address = data.bidder_address; - } - if ("status" in data && data.status != undefined) { - this.status = data.status; - } - if ("commit_hash" in data && data.commit_hash != undefined) { - this.commit_hash = data.commit_hash; - } - if ("commit_time" in data && data.commit_time != undefined) { - this.commit_time = data.commit_time; - } - if ("commit_fee" in data && data.commit_fee != undefined) { - this.commit_fee = data.commit_fee; - } - if ("reveal_time" in data && data.reveal_time != undefined) { - this.reveal_time = data.reveal_time; - } - if ("reveal_fee" in data && data.reveal_fee != undefined) { - this.reveal_fee = data.reveal_fee; - } - if ("bid_amount" in data && data.bid_amount != undefined) { - this.bid_amount = data.bid_amount; - } - } - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get bidder_address() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set bidder_address(value: string) { - pb_1.Message.setField(this, 2, value); - } - get status() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set status(value: string) { - pb_1.Message.setField(this, 3, value); - } - get commit_hash() { - return pb_1.Message.getFieldWithDefault(this, 4, "") as string; - } - set commit_hash(value: string) { - pb_1.Message.setField(this, 4, value); - } - get commit_time() { - return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp; - } - set commit_time(value: dependency_3.google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 5, value); - } - get has_commit_time() { - return pb_1.Message.getField(this, 5) != null; - } - get commit_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 6) as dependency_4.cosmos.base.v1beta1.Coin; - } - set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 6, value); - } - get has_commit_fee() { - return pb_1.Message.getField(this, 6) != null; - } - get reveal_time() { - return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 7) as dependency_3.google.protobuf.Timestamp; - } - set reveal_time(value: dependency_3.google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 7, value); - } - get has_reveal_time() { - return pb_1.Message.getField(this, 7) != null; - } - get reveal_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 8) as dependency_4.cosmos.base.v1beta1.Coin; - } - set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 8, value); - } - get has_reveal_fee() { - return pb_1.Message.getField(this, 8) != null; - } - get bid_amount() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9) as dependency_4.cosmos.base.v1beta1.Coin; - } - set bid_amount(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 9, value); - } - get has_bid_amount() { - return pb_1.Message.getField(this, 9) != null; - } - static fromObject(data: { - auction_id?: string; - bidder_address?: string; - status?: string; - commit_hash?: string; - commit_time?: ReturnType; - commit_fee?: ReturnType; - reveal_time?: ReturnType; - reveal_fee?: ReturnType; - bid_amount?: ReturnType; - }): Bid { - const message = new Bid({}); - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - if (data.bidder_address != null) { - message.bidder_address = data.bidder_address; - } - if (data.status != null) { - message.status = data.status; - } - if (data.commit_hash != null) { - message.commit_hash = data.commit_hash; - } - if (data.commit_time != null) { - message.commit_time = dependency_3.google.protobuf.Timestamp.fromObject(data.commit_time); - } - if (data.commit_fee != null) { - message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee); - } - if (data.reveal_time != null) { - message.reveal_time = dependency_3.google.protobuf.Timestamp.fromObject(data.reveal_time); - } - if (data.reveal_fee != null) { - message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee); - } - if (data.bid_amount != null) { - message.bid_amount = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.bid_amount); - } - return message; - } - toObject() { - const data: { - auction_id?: string; - bidder_address?: string; - status?: string; - commit_hash?: string; - commit_time?: ReturnType; - commit_fee?: ReturnType; - reveal_time?: ReturnType; - reveal_fee?: ReturnType; - bid_amount?: ReturnType; - } = {}; - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - if (this.bidder_address != null) { - data.bidder_address = this.bidder_address; - } - if (this.status != null) { - data.status = this.status; - } - if (this.commit_hash != null) { - data.commit_hash = this.commit_hash; - } - if (this.commit_time != null) { - data.commit_time = this.commit_time.toObject(); - } - if (this.commit_fee != null) { - data.commit_fee = this.commit_fee.toObject(); - } - if (this.reveal_time != null) { - data.reveal_time = this.reveal_time.toObject(); - } - if (this.reveal_fee != null) { - data.reveal_fee = this.reveal_fee.toObject(); - } - if (this.bid_amount != null) { - data.bid_amount = this.bid_amount.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auction_id.length) - writer.writeString(1, this.auction_id); - if (this.bidder_address.length) - writer.writeString(2, this.bidder_address); - if (this.status.length) - writer.writeString(3, this.status); - if (this.commit_hash.length) - writer.writeString(4, this.commit_hash); - if (this.has_commit_time) - writer.writeMessage(5, this.commit_time, () => this.commit_time.serialize(writer)); - if (this.has_commit_fee) - writer.writeMessage(6, this.commit_fee, () => this.commit_fee.serialize(writer)); - if (this.has_reveal_time) - writer.writeMessage(7, this.reveal_time, () => this.reveal_time.serialize(writer)); - if (this.has_reveal_fee) - writer.writeMessage(8, this.reveal_fee, () => this.reveal_fee.serialize(writer)); - if (this.has_bid_amount) - writer.writeMessage(9, this.bid_amount, () => this.bid_amount.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bid { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Bid(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.auction_id = reader.readString(); - break; - case 2: - message.bidder_address = reader.readString(); - break; - case 3: - message.status = reader.readString(); - break; - case 4: - message.commit_hash = reader.readString(); - break; - case 5: - reader.readMessage(message.commit_time, () => message.commit_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); - break; - case 6: - reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 7: - reader.readMessage(message.reveal_time, () => message.reveal_time = dependency_3.google.protobuf.Timestamp.deserialize(reader)); - break; - case 8: - reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 9: - reader.readMessage(message.bid_amount, () => message.bid_amount = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Bid { - return Bid.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/bond/v1beta1/bond.ts b/src/proto/vulcanize/bond/v1beta1/bond.ts deleted file mode 100644 index 17d554e..0000000 --- a/src/proto/vulcanize/bond/v1beta1/bond.ts +++ /dev/null @@ -1,195 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/bond/v1beta1/bond.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.bond.v1beta1 { - export class Params extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - max_bond_amount?: dependency_2.cosmos.base.v1beta1.Coin; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("max_bond_amount" in data && data.max_bond_amount != undefined) { - this.max_bond_amount = data.max_bond_amount; - } - } - } - get max_bond_amount() { - return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin; - } - set max_bond_amount(value: dependency_2.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_max_bond_amount() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - max_bond_amount?: ReturnType; - }): Params { - const message = new Params({}); - if (data.max_bond_amount != null) { - message.max_bond_amount = dependency_2.cosmos.base.v1beta1.Coin.fromObject(data.max_bond_amount); - } - return message; - } - toObject() { - const data: { - max_bond_amount?: ReturnType; - } = {}; - if (this.max_bond_amount != null) { - data.max_bond_amount = this.max_bond_amount.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_max_bond_amount) - writer.writeMessage(1, this.max_bond_amount, () => this.max_bond_amount.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.max_bond_amount, () => message.max_bond_amount = dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Params { - return Params.deserialize(bytes); - } - } - export class Bond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - owner?: string; - balance?: dependency_2.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("owner" in data && data.owner != undefined) { - this.owner = data.owner; - } - if ("balance" in data && data.balance != undefined) { - this.balance = data.balance; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get owner() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set owner(value: string) { - pb_1.Message.setField(this, 2, value); - } - get balance() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; - } - set balance(value: dependency_2.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - static fromObject(data: { - id?: string; - owner?: string; - balance?: ReturnType[]; - }): Bond { - const message = new Bond({}); - if (data.id != null) { - message.id = data.id; - } - if (data.owner != null) { - message.owner = data.owner; - } - if (data.balance != null) { - message.balance = data.balance.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - id?: string; - owner?: string; - balance?: ReturnType[]; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.owner != null) { - data.owner = this.owner; - } - if (this.balance != null) { - data.balance = this.balance.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.owner.length) - writer.writeString(2, this.owner); - if (this.balance.length) - writer.writeRepeatedMessage(3, this.balance, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Bond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.owner = reader.readString(); - break; - case 3: - reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Bond { - return Bond.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/bond/v1beta1/genesis.ts b/src/proto/vulcanize/bond/v1beta1/genesis.ts deleted file mode 100644 index 25c9246..0000000 --- a/src/proto/vulcanize/bond/v1beta1/genesis.ts +++ /dev/null @@ -1,105 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/bond/v1beta1/genesis.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./bond"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.bond.v1beta1 { - export class GenesisState extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - params?: dependency_2.vulcanize.bond.v1beta1.Params; - bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - if ("bonds" in data && data.bonds != undefined) { - this.bonds = data.bonds; - } - } - } - get params() { - return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Params, 1) as dependency_2.vulcanize.bond.v1beta1.Params; - } - set params(value: dependency_2.vulcanize.bond.v1beta1.Params) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_params() { - return pb_1.Message.getField(this, 1) != null; - } - get bonds() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 2) as dependency_2.vulcanize.bond.v1beta1.Bond[]; - } - set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - static fromObject(data: { - params?: ReturnType; - bonds?: ReturnType[]; - }): GenesisState { - const message = new GenesisState({}); - if (data.params != null) { - message.params = dependency_2.vulcanize.bond.v1beta1.Params.fromObject(data.params); - } - if (data.bonds != null) { - message.bonds = data.bonds.map(item => dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(item)); - } - return message; - } - toObject() { - const data: { - params?: ReturnType; - bonds?: ReturnType[]; - } = {}; - if (this.params != null) { - data.params = this.params.toObject(); - } - if (this.bonds != null) { - data.bonds = this.bonds.map((item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_params) - writer.writeMessage(1, this.params, () => this.params.serialize(writer)); - if (this.bonds.length) - writer.writeRepeatedMessage(2, this.bonds, (item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.bond.v1beta1.Params.deserialize(reader)); - break; - case 2: - reader.readMessage(message.bonds, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader), dependency_2.vulcanize.bond.v1beta1.Bond)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GenesisState { - return GenesisState.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/bond/v1beta1/query.ts b/src/proto/vulcanize/bond/v1beta1/query.ts deleted file mode 100644 index 9ad716d..0000000 --- a/src/proto/vulcanize/bond/v1beta1/query.ts +++ /dev/null @@ -1,718 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/bond/v1beta1/query.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./bond"; -import * as dependency_3 from "./../../../google/api/annotations"; -import * as dependency_4 from "./../../../cosmos/base/query/v1beta1/pagination"; -import * as dependency_5 from "./../../../cosmos/base/v1beta1/coin"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.bond.v1beta1 { - export class QueryParamsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): QueryParamsRequest { - const message = new QueryParamsRequest({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { - return QueryParamsRequest.deserialize(bytes); - } - } - export class QueryParamsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - params?: dependency_2.vulcanize.bond.v1beta1.Params; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - } - } - get params() { - return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Params, 1) as dependency_2.vulcanize.bond.v1beta1.Params; - } - set params(value: dependency_2.vulcanize.bond.v1beta1.Params) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_params() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - params?: ReturnType; - }): QueryParamsResponse { - const message = new QueryParamsResponse({}); - if (data.params != null) { - message.params = dependency_2.vulcanize.bond.v1beta1.Params.fromObject(data.params); - } - return message; - } - toObject() { - const data: { - params?: ReturnType; - } = {}; - if (this.params != null) { - data.params = this.params.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_params) - writer.writeMessage(1, this.params, () => this.params.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.bond.v1beta1.Params.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { - return QueryParamsResponse.deserialize(bytes); - } - } - export class QueryGetBondsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_4.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - pagination?: ReturnType; - }): QueryGetBondsRequest { - const message = new QueryGetBondsRequest({}); - if (data.pagination != null) { - message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - pagination?: ReturnType; - } = {}; - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_pagination) - writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondsRequest { - return QueryGetBondsRequest.deserialize(bytes); - } - } - export class QueryGetBondsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[]; - pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bonds" in data && data.bonds != undefined) { - this.bonds = data.bonds; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get bonds() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 1) as dependency_2.vulcanize.bond.v1beta1.Bond[]; - } - set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - bonds?: ReturnType[]; - pagination?: ReturnType; - }): QueryGetBondsResponse { - const message = new QueryGetBondsResponse({}); - if (data.bonds != null) { - message.bonds = data.bonds.map(item => dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - bonds?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.bonds != null) { - data.bonds = this.bonds.map((item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.bonds.length) - writer.writeRepeatedMessage(1, this.bonds, (item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.bonds, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader), dependency_2.vulcanize.bond.v1beta1.Bond)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondsResponse { - return QueryGetBondsResponse.deserialize(bytes); - } - } - export class QueryGetBondByIdRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - id?: string; - }): QueryGetBondByIdRequest { - const message = new QueryGetBondByIdRequest({}); - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - id?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondByIdRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondByIdRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondByIdRequest { - return QueryGetBondByIdRequest.deserialize(bytes); - } - } - export class QueryGetBondByIdResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bond?: dependency_2.vulcanize.bond.v1beta1.Bond; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bond" in data && data.bond != undefined) { - this.bond = data.bond; - } - } - } - get bond() { - return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 1) as dependency_2.vulcanize.bond.v1beta1.Bond; - } - set bond(value: dependency_2.vulcanize.bond.v1beta1.Bond) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_bond() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - bond?: ReturnType; - }): QueryGetBondByIdResponse { - const message = new QueryGetBondByIdResponse({}); - if (data.bond != null) { - message.bond = dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(data.bond); - } - return message; - } - toObject() { - const data: { - bond?: ReturnType; - } = {}; - if (this.bond != null) { - data.bond = this.bond.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_bond) - writer.writeMessage(1, this.bond, () => this.bond.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondByIdResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondByIdResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.bond, () => message.bond = dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondByIdResponse { - return QueryGetBondByIdResponse.deserialize(bytes); - } - } - export class QueryGetBondsByOwnerRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - owner?: string; - pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("owner" in data && data.owner != undefined) { - this.owner = data.owner; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get owner() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set owner(value: string) { - pb_1.Message.setField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - owner?: string; - pagination?: ReturnType; - }): QueryGetBondsByOwnerRequest { - const message = new QueryGetBondsByOwnerRequest({}); - if (data.owner != null) { - message.owner = data.owner; - } - if (data.pagination != null) { - message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - owner?: string; - pagination?: ReturnType; - } = {}; - if (this.owner != null) { - data.owner = this.owner; - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.owner.length) - writer.writeString(1, this.owner); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsByOwnerRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsByOwnerRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.owner = reader.readString(); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondsByOwnerRequest { - return QueryGetBondsByOwnerRequest.deserialize(bytes); - } - } - export class QueryGetBondsByOwnerResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[]; - pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bonds" in data && data.bonds != undefined) { - this.bonds = data.bonds; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get bonds() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 1) as dependency_2.vulcanize.bond.v1beta1.Bond[]; - } - set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - bonds?: ReturnType[]; - pagination?: ReturnType; - }): QueryGetBondsByOwnerResponse { - const message = new QueryGetBondsByOwnerResponse({}); - if (data.bonds != null) { - message.bonds = data.bonds.map(item => dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - bonds?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.bonds != null) { - data.bonds = this.bonds.map((item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.bonds.length) - writer.writeRepeatedMessage(1, this.bonds, (item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsByOwnerResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsByOwnerResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.bonds, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader), dependency_2.vulcanize.bond.v1beta1.Bond)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondsByOwnerResponse { - return QueryGetBondsByOwnerResponse.deserialize(bytes); - } - } - export class QueryGetBondModuleBalanceRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): QueryGetBondModuleBalanceRequest { - const message = new QueryGetBondModuleBalanceRequest({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondModuleBalanceRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondModuleBalanceRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondModuleBalanceRequest { - return QueryGetBondModuleBalanceRequest.deserialize(bytes); - } - } - export class QueryGetBondModuleBalanceResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - balance?: dependency_5.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("balance" in data && data.balance != undefined) { - this.balance = data.balance; - } - } - } - get balance() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 2) as dependency_5.cosmos.base.v1beta1.Coin[]; - } - set balance(value: dependency_5.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - static fromObject(data: { - balance?: ReturnType[]; - }): QueryGetBondModuleBalanceResponse { - const message = new QueryGetBondModuleBalanceResponse({}); - if (data.balance != null) { - message.balance = data.balance.map(item => dependency_5.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - balance?: ReturnType[]; - } = {}; - if (this.balance != null) { - data.balance = this.balance.map((item: dependency_5.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.balance.length) - writer.writeRepeatedMessage(2, this.balance, (item: dependency_5.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondModuleBalanceResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondModuleBalanceResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 2: - reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_5.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetBondModuleBalanceResponse { - return QueryGetBondModuleBalanceResponse.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/bond/v1beta1/tx.ts b/src/proto/vulcanize/bond/v1beta1/tx.ts deleted file mode 100644 index 28bd760..0000000 --- a/src/proto/vulcanize/bond/v1beta1/tx.ts +++ /dev/null @@ -1,605 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/bond/v1beta1/tx.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.bond.v1beta1 { - export class MsgCreateBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - signer?: string; - coins?: dependency_2.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - if ("coins" in data && data.coins != undefined) { - this.coins = data.coins; - } - } - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 1, value); - } - get coins() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 2) as dependency_2.cosmos.base.v1beta1.Coin[]; - } - set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - static fromObject(data: { - signer?: string; - coins?: ReturnType[]; - }): MsgCreateBond { - const message = new MsgCreateBond({}); - if (data.signer != null) { - message.signer = data.signer; - } - if (data.coins != null) { - message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - signer?: string; - coins?: ReturnType[]; - } = {}; - if (this.signer != null) { - data.signer = this.signer; - } - if (this.coins != null) { - data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.signer.length) - writer.writeString(1, this.signer); - if (this.coins.length) - writer.writeRepeatedMessage(2, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.signer = reader.readString(); - break; - case 2: - reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCreateBond { - return MsgCreateBond.deserialize(bytes); - } - } - export class MsgCreateBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - id?: string; - }): MsgCreateBondResponse { - const message = new MsgCreateBondResponse({}); - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - id?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCreateBondResponse { - return MsgCreateBondResponse.deserialize(bytes); - } - } - export class MsgRefillBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - signer?: string; - coins?: dependency_2.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - if ("coins" in data && data.coins != undefined) { - this.coins = data.coins; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - get coins() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; - } - set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - static fromObject(data: { - id?: string; - signer?: string; - coins?: ReturnType[]; - }): MsgRefillBond { - const message = new MsgRefillBond({}); - if (data.id != null) { - message.id = data.id; - } - if (data.signer != null) { - message.signer = data.signer; - } - if (data.coins != null) { - message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - id?: string; - signer?: string; - coins?: ReturnType[]; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.signer != null) { - data.signer = this.signer; - } - if (this.coins != null) { - data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (this.coins.length) - writer.writeRepeatedMessage(3, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRefillBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRefillBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - case 3: - reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgRefillBond { - return MsgRefillBond.deserialize(bytes); - } - } - export class MsgRefillBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgRefillBondResponse { - const message = new MsgRefillBondResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRefillBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRefillBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgRefillBondResponse { - return MsgRefillBondResponse.deserialize(bytes); - } - } - export class MsgWithdrawBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - signer?: string; - coins?: dependency_2.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - if ("coins" in data && data.coins != undefined) { - this.coins = data.coins; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - get coins() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[]; - } - set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - static fromObject(data: { - id?: string; - signer?: string; - coins?: ReturnType[]; - }): MsgWithdrawBond { - const message = new MsgWithdrawBond({}); - if (data.id != null) { - message.id = data.id; - } - if (data.signer != null) { - message.signer = data.signer; - } - if (data.coins != null) { - message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - id?: string; - signer?: string; - coins?: ReturnType[]; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.signer != null) { - data.signer = this.signer; - } - if (this.coins != null) { - data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (this.coins.length) - writer.writeRepeatedMessage(3, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - case 3: - reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgWithdrawBond { - return MsgWithdrawBond.deserialize(bytes); - } - } - export class MsgWithdrawBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgWithdrawBondResponse { - const message = new MsgWithdrawBondResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgWithdrawBondResponse { - return MsgWithdrawBondResponse.deserialize(bytes); - } - } - export class MsgCancelBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - id?: string; - signer?: string; - }): MsgCancelBond { - const message = new MsgCancelBond({}); - if (data.id != null) { - message.id = data.id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - id?: string; - signer?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCancelBond { - return MsgCancelBond.deserialize(bytes); - } - } - export class MsgCancelBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgCancelBondResponse { - const message = new MsgCancelBondResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgCancelBondResponse { - return MsgCancelBondResponse.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/registry/v1beta1/genesis.ts b/src/proto/vulcanize/registry/v1beta1/genesis.ts deleted file mode 100644 index 561ccdc..0000000 --- a/src/proto/vulcanize/registry/v1beta1/genesis.ts +++ /dev/null @@ -1,151 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/registry/v1beta1/genesis.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./registry"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.registry.v1beta1 { - export class GenesisState extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - params?: dependency_2.vulcanize.registry.v1beta1.Params; - records?: dependency_2.vulcanize.registry.v1beta1.Record[]; - authorities?: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry[]; - names?: dependency_2.vulcanize.registry.v1beta1.NameEntry[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - if ("records" in data && data.records != undefined) { - this.records = data.records; - } - if ("authorities" in data && data.authorities != undefined) { - this.authorities = data.authorities; - } - if ("names" in data && data.names != undefined) { - this.names = data.names; - } - } - } - get params() { - return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.registry.v1beta1.Params, 1) as dependency_2.vulcanize.registry.v1beta1.Params; - } - set params(value: dependency_2.vulcanize.registry.v1beta1.Params) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_params() { - return pb_1.Message.getField(this, 1) != null; - } - get records() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.Record, 2) as dependency_2.vulcanize.registry.v1beta1.Record[]; - } - set records(value: dependency_2.vulcanize.registry.v1beta1.Record[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - get authorities() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.AuthorityEntry, 3) as dependency_2.vulcanize.registry.v1beta1.AuthorityEntry[]; - } - set authorities(value: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - get names() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.NameEntry, 4) as dependency_2.vulcanize.registry.v1beta1.NameEntry[]; - } - set names(value: dependency_2.vulcanize.registry.v1beta1.NameEntry[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - static fromObject(data: { - params?: ReturnType; - records?: ReturnType[]; - authorities?: ReturnType[]; - names?: ReturnType[]; - }): GenesisState { - const message = new GenesisState({}); - if (data.params != null) { - message.params = dependency_2.vulcanize.registry.v1beta1.Params.fromObject(data.params); - } - if (data.records != null) { - message.records = data.records.map(item => dependency_2.vulcanize.registry.v1beta1.Record.fromObject(item)); - } - if (data.authorities != null) { - message.authorities = data.authorities.map(item => dependency_2.vulcanize.registry.v1beta1.AuthorityEntry.fromObject(item)); - } - if (data.names != null) { - message.names = data.names.map(item => dependency_2.vulcanize.registry.v1beta1.NameEntry.fromObject(item)); - } - return message; - } - toObject() { - const data: { - params?: ReturnType; - records?: ReturnType[]; - authorities?: ReturnType[]; - names?: ReturnType[]; - } = {}; - if (this.params != null) { - data.params = this.params.toObject(); - } - if (this.records != null) { - data.records = this.records.map((item: dependency_2.vulcanize.registry.v1beta1.Record) => item.toObject()); - } - if (this.authorities != null) { - data.authorities = this.authorities.map((item: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry) => item.toObject()); - } - if (this.names != null) { - data.names = this.names.map((item: dependency_2.vulcanize.registry.v1beta1.NameEntry) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_params) - writer.writeMessage(1, this.params, () => this.params.serialize(writer)); - if (this.records.length) - writer.writeRepeatedMessage(2, this.records, (item: dependency_2.vulcanize.registry.v1beta1.Record) => item.serialize(writer)); - if (this.authorities.length) - writer.writeRepeatedMessage(3, this.authorities, (item: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry) => item.serialize(writer)); - if (this.names.length) - writer.writeRepeatedMessage(4, this.names, (item: dependency_2.vulcanize.registry.v1beta1.NameEntry) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.registry.v1beta1.Params.deserialize(reader)); - break; - case 2: - reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.registry.v1beta1.Record.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.Record)); - break; - case 3: - reader.readMessage(message.authorities, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.vulcanize.registry.v1beta1.AuthorityEntry.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.AuthorityEntry)); - break; - case 4: - reader.readMessage(message.names, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.vulcanize.registry.v1beta1.NameEntry.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.NameEntry)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GenesisState { - return GenesisState.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/registry/v1beta1/query.ts b/src/proto/vulcanize/registry/v1beta1/query.ts deleted file mode 100644 index efa3ea9..0000000 --- a/src/proto/vulcanize/registry/v1beta1/query.ts +++ /dev/null @@ -1,2443 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/registry/v1beta1/query.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./registry"; -import * as dependency_2 from "./../../../google/api/annotations"; -import * as dependency_3 from "./../../../cosmos/base/query/v1beta1/pagination"; -import * as dependency_4 from "./../../../gogoproto/gogo"; -import * as dependency_5 from "./../../../cosmos/base/v1beta1/coin"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.registry.v1beta1 { - export class QueryParamsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): QueryParamsRequest { - const message = new QueryParamsRequest({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryParamsRequest { - return QueryParamsRequest.deserialize(bytes); - } - } - export class QueryParamsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - params?: dependency_1.vulcanize.registry.v1beta1.Params; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - } - } - get params() { - return pb_1.Message.getWrapperField(this, dependency_1.vulcanize.registry.v1beta1.Params, 1) as dependency_1.vulcanize.registry.v1beta1.Params; - } - set params(value: dependency_1.vulcanize.registry.v1beta1.Params) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_params() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - params?: ReturnType; - }): QueryParamsResponse { - const message = new QueryParamsResponse({}); - if (data.params != null) { - message.params = dependency_1.vulcanize.registry.v1beta1.Params.fromObject(data.params); - } - return message; - } - toObject() { - const data: { - params?: ReturnType; - } = {}; - if (this.params != null) { - data.params = this.params.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_params) - writer.writeMessage(1, this.params, () => this.params.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.params, () => message.params = dependency_1.vulcanize.registry.v1beta1.Params.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryParamsResponse { - return QueryParamsResponse.deserialize(bytes); - } - } - export class QueryListRecordsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - attributes?: QueryListRecordsRequest.KeyValueInput[]; - all?: boolean; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("attributes" in data && data.attributes != undefined) { - this.attributes = data.attributes; - } - if ("all" in data && data.all != undefined) { - this.all = data.all; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get attributes() { - return pb_1.Message.getRepeatedWrapperField(this, QueryListRecordsRequest.KeyValueInput, 1) as QueryListRecordsRequest.KeyValueInput[]; - } - set attributes(value: QueryListRecordsRequest.KeyValueInput[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get all() { - return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; - } - set all(value: boolean) { - pb_1.Message.setField(this, 2, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 3) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 3) != null; - } - static fromObject(data: { - attributes?: ReturnType[]; - all?: boolean; - pagination?: ReturnType; - }): QueryListRecordsRequest { - const message = new QueryListRecordsRequest({}); - if (data.attributes != null) { - message.attributes = data.attributes.map(item => QueryListRecordsRequest.KeyValueInput.fromObject(item)); - } - if (data.all != null) { - message.all = data.all; - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - attributes?: ReturnType[]; - all?: boolean; - pagination?: ReturnType; - } = {}; - if (this.attributes != null) { - data.attributes = this.attributes.map((item: QueryListRecordsRequest.KeyValueInput) => item.toObject()); - } - if (this.all != null) { - data.all = this.all; - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.attributes.length) - writer.writeRepeatedMessage(1, this.attributes, (item: QueryListRecordsRequest.KeyValueInput) => item.serialize(writer)); - if (this.all != false) - writer.writeBool(2, this.all); - if (this.has_pagination) - writer.writeMessage(3, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListRecordsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryListRecordsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.attributes, () => pb_1.Message.addToRepeatedWrapperField(message, 1, QueryListRecordsRequest.KeyValueInput.deserialize(reader), QueryListRecordsRequest.KeyValueInput)); - break; - case 2: - message.all = reader.readBool(); - break; - case 3: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryListRecordsRequest { - return QueryListRecordsRequest.deserialize(bytes); - } - } - export namespace QueryListRecordsRequest { - export class LinkInput extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - id?: string; - }): LinkInput { - const message = new LinkInput({}); - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - id?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LinkInput { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LinkInput(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): LinkInput { - return LinkInput.deserialize(bytes); - } - } - export class ArrayInput extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - values?: QueryListRecordsRequest.ValueInput[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("values" in data && data.values != undefined) { - this.values = data.values; - } - } - } - get values() { - return pb_1.Message.getRepeatedWrapperField(this, QueryListRecordsRequest.ValueInput, 1) as QueryListRecordsRequest.ValueInput[]; - } - set values(value: QueryListRecordsRequest.ValueInput[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - values?: ReturnType[]; - }): ArrayInput { - const message = new ArrayInput({}); - if (data.values != null) { - message.values = data.values.map(item => QueryListRecordsRequest.ValueInput.fromObject(item)); - } - return message; - } - toObject() { - const data: { - values?: ReturnType[]; - } = {}; - if (this.values != null) { - data.values = this.values.map((item: QueryListRecordsRequest.ValueInput) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.values.length) - writer.writeRepeatedMessage(1, this.values, (item: QueryListRecordsRequest.ValueInput) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ArrayInput { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ArrayInput(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.values, () => pb_1.Message.addToRepeatedWrapperField(message, 1, QueryListRecordsRequest.ValueInput.deserialize(reader), QueryListRecordsRequest.ValueInput)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ArrayInput { - return ArrayInput.deserialize(bytes); - } - } - export class MapInput extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - values?: Map; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("values" in data && data.values != undefined) { - this.values = data.values; - } - } - if (!this.values) - this.values = new Map(); - } - get values() { - return pb_1.Message.getField(this, 1) as any as Map; - } - set values(value: Map) { - pb_1.Message.setField(this, 1, value as any); - } - static fromObject(data: { - values?: { - [key: string]: ReturnType; - }; - }): MapInput { - const message = new MapInput({}); - if (typeof data.values == "object") { - message.values = new Map(Object.entries(data.values).map(([key, value]) => [key, QueryListRecordsRequest.ValueInput.fromObject(value)])); - } - return message; - } - toObject() { - const data: { - values?: { - [key: string]: ReturnType; - }; - } = {}; - if (this.values != null) { - data.values = (Object.fromEntries)((Array.from)(this.values).map(([key, value]) => [key, value.toObject()])); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - for (const [key, value] of this.values) { - writer.writeMessage(1, this.values, () => { - writer.writeString(1, key); - writer.writeMessage(2, value, () => value.serialize(writer)); - }); - } - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MapInput { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MapInput(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.values as any, reader, reader.readString, () => { - let value; - reader.readMessage(message, () => value = QueryListRecordsRequest.ValueInput.deserialize(reader)); - return value; - })); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MapInput { - return MapInput.deserialize(bytes); - } - } - export class ValueInput extends pb_1.Message { - #one_of_decls: number[][] = [[1, 2, 3, 4, 5, 6, 7]]; - constructor(data?: any[] | ({} & (({ - string?: string; - int?: never; - float?: never; - boolean?: never; - link?: never; - array?: never; - map?: never; - } | { - string?: never; - int?: number; - float?: never; - boolean?: never; - link?: never; - array?: never; - map?: never; - } | { - string?: never; - int?: never; - float?: number; - boolean?: never; - link?: never; - array?: never; - map?: never; - } | { - string?: never; - int?: never; - float?: never; - boolean?: boolean; - link?: never; - array?: never; - map?: never; - } | { - string?: never; - int?: never; - float?: never; - boolean?: never; - link?: string; - array?: never; - map?: never; - } | { - string?: never; - int?: never; - float?: never; - boolean?: never; - link?: never; - array?: QueryListRecordsRequest.ArrayInput; - map?: never; - } | { - string?: never; - int?: never; - float?: never; - boolean?: never; - link?: never; - array?: never; - map?: QueryListRecordsRequest.MapInput; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("string" in data && data.string != undefined) { - this.string = data.string; - } - if ("int" in data && data.int != undefined) { - this.int = data.int; - } - if ("float" in data && data.float != undefined) { - this.float = data.float; - } - if ("boolean" in data && data.boolean != undefined) { - this.boolean = data.boolean; - } - if ("link" in data && data.link != undefined) { - this.link = data.link; - } - if ("array" in data && data.array != undefined) { - this.array = data.array; - } - if ("map" in data && data.map != undefined) { - this.map = data.map; - } - } - } - get string() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set string(value: string) { - pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value); - } - get has_string() { - return pb_1.Message.getField(this, 1) != null; - } - get int() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set int(value: number) { - pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value); - } - get has_int() { - return pb_1.Message.getField(this, 2) != null; - } - get float() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set float(value: number) { - pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value); - } - get has_float() { - return pb_1.Message.getField(this, 3) != null; - } - get boolean() { - return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; - } - set boolean(value: boolean) { - pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value); - } - get has_boolean() { - return pb_1.Message.getField(this, 4) != null; - } - get link() { - return pb_1.Message.getFieldWithDefault(this, 5, "") as string; - } - set link(value: string) { - pb_1.Message.setOneofField(this, 5, this.#one_of_decls[0], value); - } - get has_link() { - return pb_1.Message.getField(this, 5) != null; - } - get array() { - return pb_1.Message.getWrapperField(this, QueryListRecordsRequest.ArrayInput, 6) as QueryListRecordsRequest.ArrayInput; - } - set array(value: QueryListRecordsRequest.ArrayInput) { - pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value); - } - get has_array() { - return pb_1.Message.getField(this, 6) != null; - } - get map() { - return pb_1.Message.getWrapperField(this, QueryListRecordsRequest.MapInput, 7) as QueryListRecordsRequest.MapInput; - } - set map(value: QueryListRecordsRequest.MapInput) { - pb_1.Message.setOneofWrapperField(this, 7, this.#one_of_decls[0], value); - } - get has_map() { - return pb_1.Message.getField(this, 7) != null; - } - get value() { - const cases: { - [index: number]: "none" | "string" | "int" | "float" | "boolean" | "link" | "array" | "map"; - } = { - 0: "none", - 1: "string", - 2: "int", - 3: "float", - 4: "boolean", - 5: "link", - 6: "array", - 7: "map" - }; - return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 5, 6, 7])]; - } - static fromObject(data: { - string?: string; - int?: number; - float?: number; - boolean?: boolean; - link?: string; - array?: ReturnType; - map?: ReturnType; - }): ValueInput { - const message = new ValueInput({}); - if (data.string != null) { - message.string = data.string; - } - if (data.int != null) { - message.int = data.int; - } - if (data.float != null) { - message.float = data.float; - } - if (data.boolean != null) { - message.boolean = data.boolean; - } - if (data.link != null) { - message.link = data.link; - } - if (data.array != null) { - message.array = QueryListRecordsRequest.ArrayInput.fromObject(data.array); - } - if (data.map != null) { - message.map = QueryListRecordsRequest.MapInput.fromObject(data.map); - } - return message; - } - toObject() { - const data: { - string?: string; - int?: number; - float?: number; - boolean?: boolean; - link?: string; - array?: ReturnType; - map?: ReturnType; - } = {}; - if (this.string != null) { - data.string = this.string; - } - if (this.int != null) { - data.int = this.int; - } - if (this.float != null) { - data.float = this.float; - } - if (this.boolean != null) { - data.boolean = this.boolean; - } - if (this.link != null) { - data.link = this.link; - } - if (this.array != null) { - data.array = this.array.toObject(); - } - if (this.map != null) { - data.map = this.map.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_string) - writer.writeString(1, this.string); - if (this.has_int) - writer.writeInt64(2, this.int); - if (this.has_float) - writer.writeDouble(3, this.float); - if (this.has_boolean) - writer.writeBool(4, this.boolean); - if (this.has_link) - writer.writeString(5, this.link); - if (this.has_array) - writer.writeMessage(6, this.array, () => this.array.serialize(writer)); - if (this.has_map) - writer.writeMessage(7, this.map, () => this.map.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValueInput { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValueInput(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.string = reader.readString(); - break; - case 2: - message.int = reader.readInt64(); - break; - case 3: - message.float = reader.readDouble(); - break; - case 4: - message.boolean = reader.readBool(); - break; - case 5: - message.link = reader.readString(); - break; - case 6: - reader.readMessage(message.array, () => message.array = QueryListRecordsRequest.ArrayInput.deserialize(reader)); - break; - case 7: - reader.readMessage(message.map, () => message.map = QueryListRecordsRequest.MapInput.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ValueInput { - return ValueInput.deserialize(bytes); - } - } - export class KeyValueInput extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - key?: string; - value?: QueryListRecordsRequest.ValueInput; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("key" in data && data.key != undefined) { - this.key = data.key; - } - if ("value" in data && data.value != undefined) { - this.value = data.value; - } - } - } - get key() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set key(value: string) { - pb_1.Message.setField(this, 1, value); - } - get value() { - return pb_1.Message.getWrapperField(this, QueryListRecordsRequest.ValueInput, 2) as QueryListRecordsRequest.ValueInput; - } - set value(value: QueryListRecordsRequest.ValueInput) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_value() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - key?: string; - value?: ReturnType; - }): KeyValueInput { - const message = new KeyValueInput({}); - if (data.key != null) { - message.key = data.key; - } - if (data.value != null) { - message.value = QueryListRecordsRequest.ValueInput.fromObject(data.value); - } - return message; - } - toObject() { - const data: { - key?: string; - value?: ReturnType; - } = {}; - if (this.key != null) { - data.key = this.key; - } - if (this.value != null) { - data.value = this.value.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.key.length) - writer.writeString(1, this.key); - if (this.has_value) - writer.writeMessage(2, this.value, () => this.value.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KeyValueInput { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KeyValueInput(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.key = reader.readString(); - break; - case 2: - reader.readMessage(message.value, () => message.value = QueryListRecordsRequest.ValueInput.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): KeyValueInput { - return KeyValueInput.deserialize(bytes); - } - } - } - export class QueryListRecordsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - records?: dependency_1.vulcanize.registry.v1beta1.Record[]; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("records" in data && data.records != undefined) { - this.records = data.records; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get records() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.vulcanize.registry.v1beta1.Record, 1) as dependency_1.vulcanize.registry.v1beta1.Record[]; - } - set records(value: dependency_1.vulcanize.registry.v1beta1.Record[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - records?: ReturnType[]; - pagination?: ReturnType; - }): QueryListRecordsResponse { - const message = new QueryListRecordsResponse({}); - if (data.records != null) { - message.records = data.records.map(item => dependency_1.vulcanize.registry.v1beta1.Record.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - records?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.records != null) { - data.records = this.records.map((item: dependency_1.vulcanize.registry.v1beta1.Record) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.records.length) - writer.writeRepeatedMessage(1, this.records, (item: dependency_1.vulcanize.registry.v1beta1.Record) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListRecordsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryListRecordsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.vulcanize.registry.v1beta1.Record.deserialize(reader), dependency_1.vulcanize.registry.v1beta1.Record)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryListRecordsResponse { - return QueryListRecordsResponse.deserialize(bytes); - } - } - export class QueryRecordByIDRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - id?: string; - }): QueryRecordByIDRequest { - const message = new QueryRecordByIDRequest({}); - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - id?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByIDRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRecordByIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryRecordByIDRequest { - return QueryRecordByIDRequest.deserialize(bytes); - } - } - export class QueryRecordByIDResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record?: dependency_1.vulcanize.registry.v1beta1.Record; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record" in data && data.record != undefined) { - this.record = data.record; - } - } - } - get record() { - return pb_1.Message.getWrapperField(this, dependency_1.vulcanize.registry.v1beta1.Record, 1) as dependency_1.vulcanize.registry.v1beta1.Record; - } - set record(value: dependency_1.vulcanize.registry.v1beta1.Record) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_record() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - record?: ReturnType; - }): QueryRecordByIDResponse { - const message = new QueryRecordByIDResponse({}); - if (data.record != null) { - message.record = dependency_1.vulcanize.registry.v1beta1.Record.fromObject(data.record); - } - return message; - } - toObject() { - const data: { - record?: ReturnType; - } = {}; - if (this.record != null) { - data.record = this.record.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_record) - writer.writeMessage(1, this.record, () => this.record.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByIDResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRecordByIDResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.record, () => message.record = dependency_1.vulcanize.registry.v1beta1.Record.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryRecordByIDResponse { - return QueryRecordByIDResponse.deserialize(bytes); - } - } - export class QueryRecordByBondIDRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 2) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - id?: string; - pagination?: ReturnType; - }): QueryRecordByBondIDRequest { - const message = new QueryRecordByBondIDRequest({}); - if (data.id != null) { - message.id = data.id; - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - id?: string; - pagination?: ReturnType; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByBondIDRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRecordByBondIDRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryRecordByBondIDRequest { - return QueryRecordByBondIDRequest.deserialize(bytes); - } - } - export class QueryRecordByBondIDResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - records?: dependency_1.vulcanize.registry.v1beta1.Record[]; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("records" in data && data.records != undefined) { - this.records = data.records; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get records() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.vulcanize.registry.v1beta1.Record, 1) as dependency_1.vulcanize.registry.v1beta1.Record[]; - } - set records(value: dependency_1.vulcanize.registry.v1beta1.Record[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - records?: ReturnType[]; - pagination?: ReturnType; - }): QueryRecordByBondIDResponse { - const message = new QueryRecordByBondIDResponse({}); - if (data.records != null) { - message.records = data.records.map(item => dependency_1.vulcanize.registry.v1beta1.Record.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - records?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.records != null) { - data.records = this.records.map((item: dependency_1.vulcanize.registry.v1beta1.Record) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.records.length) - writer.writeRepeatedMessage(1, this.records, (item: dependency_1.vulcanize.registry.v1beta1.Record) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByBondIDResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryRecordByBondIDResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.vulcanize.registry.v1beta1.Record.deserialize(reader), dependency_1.vulcanize.registry.v1beta1.Record)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryRecordByBondIDResponse { - return QueryRecordByBondIDResponse.deserialize(bytes); - } - } - export class GetRegistryModuleBalanceRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): GetRegistryModuleBalanceRequest { - const message = new GetRegistryModuleBalanceRequest({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetRegistryModuleBalanceRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetRegistryModuleBalanceRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetRegistryModuleBalanceRequest { - return GetRegistryModuleBalanceRequest.deserialize(bytes); - } - } - export class GetRegistryModuleBalanceResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - balances?: AccountBalance[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("balances" in data && data.balances != undefined) { - this.balances = data.balances; - } - } - } - get balances() { - return pb_1.Message.getRepeatedWrapperField(this, AccountBalance, 1) as AccountBalance[]; - } - set balances(value: AccountBalance[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - static fromObject(data: { - balances?: ReturnType[]; - }): GetRegistryModuleBalanceResponse { - const message = new GetRegistryModuleBalanceResponse({}); - if (data.balances != null) { - message.balances = data.balances.map(item => AccountBalance.fromObject(item)); - } - return message; - } - toObject() { - const data: { - balances?: ReturnType[]; - } = {}; - if (this.balances != null) { - data.balances = this.balances.map((item: AccountBalance) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.balances.length) - writer.writeRepeatedMessage(1, this.balances, (item: AccountBalance) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetRegistryModuleBalanceResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetRegistryModuleBalanceResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.balances, () => pb_1.Message.addToRepeatedWrapperField(message, 1, AccountBalance.deserialize(reader), AccountBalance)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetRegistryModuleBalanceResponse { - return GetRegistryModuleBalanceResponse.deserialize(bytes); - } - } - export class AccountBalance extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - account_name?: string; - balance?: dependency_5.cosmos.base.v1beta1.Coin[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("account_name" in data && data.account_name != undefined) { - this.account_name = data.account_name; - } - if ("balance" in data && data.balance != undefined) { - this.balance = data.balance; - } - } - } - get account_name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set account_name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get balance() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 3) as dependency_5.cosmos.base.v1beta1.Coin[]; - } - set balance(value: dependency_5.cosmos.base.v1beta1.Coin[]) { - pb_1.Message.setRepeatedWrapperField(this, 3, value); - } - static fromObject(data: { - account_name?: string; - balance?: ReturnType[]; - }): AccountBalance { - const message = new AccountBalance({}); - if (data.account_name != null) { - message.account_name = data.account_name; - } - if (data.balance != null) { - message.balance = data.balance.map(item => dependency_5.cosmos.base.v1beta1.Coin.fromObject(item)); - } - return message; - } - toObject() { - const data: { - account_name?: string; - balance?: ReturnType[]; - } = {}; - if (this.account_name != null) { - data.account_name = this.account_name; - } - if (this.balance != null) { - data.balance = this.balance.map((item: dependency_5.cosmos.base.v1beta1.Coin) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.account_name.length) - writer.writeString(1, this.account_name); - if (this.balance.length) - writer.writeRepeatedMessage(3, this.balance, (item: dependency_5.cosmos.base.v1beta1.Coin) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AccountBalance { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AccountBalance(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.account_name = reader.readString(); - break; - case 3: - reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_5.cosmos.base.v1beta1.Coin)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AccountBalance { - return AccountBalance.deserialize(bytes); - } - } - export class QueryListNameRecordsRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - pagination?: ReturnType; - }): QueryListNameRecordsRequest { - const message = new QueryListNameRecordsRequest({}); - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - pagination?: ReturnType; - } = {}; - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_pagination) - writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListNameRecordsRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryListNameRecordsRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryListNameRecordsRequest { - return QueryListNameRecordsRequest.deserialize(bytes); - } - } - export class QueryListNameRecordsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - names?: dependency_1.vulcanize.registry.v1beta1.NameEntry[]; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("names" in data && data.names != undefined) { - this.names = data.names; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get names() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.vulcanize.registry.v1beta1.NameEntry, 1) as dependency_1.vulcanize.registry.v1beta1.NameEntry[]; - } - set names(value: dependency_1.vulcanize.registry.v1beta1.NameEntry[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - names?: ReturnType[]; - pagination?: ReturnType; - }): QueryListNameRecordsResponse { - const message = new QueryListNameRecordsResponse({}); - if (data.names != null) { - message.names = data.names.map(item => dependency_1.vulcanize.registry.v1beta1.NameEntry.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - names?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.names != null) { - data.names = this.names.map((item: dependency_1.vulcanize.registry.v1beta1.NameEntry) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.names.length) - writer.writeRepeatedMessage(1, this.names, (item: dependency_1.vulcanize.registry.v1beta1.NameEntry) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListNameRecordsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryListNameRecordsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.names, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_1.vulcanize.registry.v1beta1.NameEntry.deserialize(reader), dependency_1.vulcanize.registry.v1beta1.NameEntry)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryListNameRecordsResponse { - return QueryListNameRecordsResponse.deserialize(bytes); - } - } - export class QueryWhoisRequest extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - name?: string; - }): QueryWhoisRequest { - const message = new QueryWhoisRequest({}); - if (data.name != null) { - message.name = data.name; - } - return message; - } - toObject() { - const data: { - name?: string; - } = {}; - if (this.name != null) { - data.name = this.name; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.name.length) - writer.writeString(1, this.name); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryWhoisRequest { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryWhoisRequest(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryWhoisRequest { - return QueryWhoisRequest.deserialize(bytes); - } - } - export class QueryWhoisResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name_authority?: dependency_1.vulcanize.registry.v1beta1.NameAuthority; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name_authority" in data && data.name_authority != undefined) { - this.name_authority = data.name_authority; - } - } - } - get name_authority() { - return pb_1.Message.getWrapperField(this, dependency_1.vulcanize.registry.v1beta1.NameAuthority, 1) as dependency_1.vulcanize.registry.v1beta1.NameAuthority; - } - set name_authority(value: dependency_1.vulcanize.registry.v1beta1.NameAuthority) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_name_authority() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - name_authority?: ReturnType; - }): QueryWhoisResponse { - const message = new QueryWhoisResponse({}); - if (data.name_authority != null) { - message.name_authority = dependency_1.vulcanize.registry.v1beta1.NameAuthority.fromObject(data.name_authority); - } - return message; - } - toObject() { - const data: { - name_authority?: ReturnType; - } = {}; - if (this.name_authority != null) { - data.name_authority = this.name_authority.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name_authority) - writer.writeMessage(1, this.name_authority, () => this.name_authority.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryWhoisResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryWhoisResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.name_authority, () => message.name_authority = dependency_1.vulcanize.registry.v1beta1.NameAuthority.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryWhoisResponse { - return QueryWhoisResponse.deserialize(bytes); - } - } - export class QueryLookupCrn extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - crn?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("crn" in data && data.crn != undefined) { - this.crn = data.crn; - } - } - } - get crn() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set crn(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - crn?: string; - }): QueryLookupCrn { - const message = new QueryLookupCrn({}); - if (data.crn != null) { - message.crn = data.crn; - } - return message; - } - toObject() { - const data: { - crn?: string; - } = {}; - if (this.crn != null) { - data.crn = this.crn; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.crn.length) - writer.writeString(1, this.crn); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLookupCrn { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryLookupCrn(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.crn = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryLookupCrn { - return QueryLookupCrn.deserialize(bytes); - } - } - export class QueryLookupCrnResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: dependency_1.vulcanize.registry.v1beta1.NameRecord; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - } - } - get name() { - return pb_1.Message.getWrapperField(this, dependency_1.vulcanize.registry.v1beta1.NameRecord, 1) as dependency_1.vulcanize.registry.v1beta1.NameRecord; - } - set name(value: dependency_1.vulcanize.registry.v1beta1.NameRecord) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_name() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - name?: ReturnType; - }): QueryLookupCrnResponse { - const message = new QueryLookupCrnResponse({}); - if (data.name != null) { - message.name = dependency_1.vulcanize.registry.v1beta1.NameRecord.fromObject(data.name); - } - return message; - } - toObject() { - const data: { - name?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_name) - writer.writeMessage(1, this.name, () => this.name.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLookupCrnResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryLookupCrnResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.name, () => message.name = dependency_1.vulcanize.registry.v1beta1.NameRecord.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryLookupCrnResponse { - return QueryLookupCrnResponse.deserialize(bytes); - } - } - export class QueryResolveCrn extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - crn?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("crn" in data && data.crn != undefined) { - this.crn = data.crn; - } - } - } - get crn() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set crn(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - crn?: string; - }): QueryResolveCrn { - const message = new QueryResolveCrn({}); - if (data.crn != null) { - message.crn = data.crn; - } - return message; - } - toObject() { - const data: { - crn?: string; - } = {}; - if (this.crn != null) { - data.crn = this.crn; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.crn.length) - writer.writeString(1, this.crn); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryResolveCrn { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryResolveCrn(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.crn = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryResolveCrn { - return QueryResolveCrn.deserialize(bytes); - } - } - export class QueryResolveCrnResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record?: dependency_1.vulcanize.registry.v1beta1.Record; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record" in data && data.record != undefined) { - this.record = data.record; - } - } - } - get record() { - return pb_1.Message.getWrapperField(this, dependency_1.vulcanize.registry.v1beta1.Record, 1) as dependency_1.vulcanize.registry.v1beta1.Record; - } - set record(value: dependency_1.vulcanize.registry.v1beta1.Record) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_record() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - record?: ReturnType; - }): QueryResolveCrnResponse { - const message = new QueryResolveCrnResponse({}); - if (data.record != null) { - message.record = dependency_1.vulcanize.registry.v1beta1.Record.fromObject(data.record); - } - return message; - } - toObject() { - const data: { - record?: ReturnType; - } = {}; - if (this.record != null) { - data.record = this.record.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_record) - writer.writeMessage(1, this.record, () => this.record.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryResolveCrnResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryResolveCrnResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.record, () => message.record = dependency_1.vulcanize.registry.v1beta1.Record.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryResolveCrnResponse { - return QueryResolveCrnResponse.deserialize(bytes); - } - } - export class QueryGetRecordExpiryQueue extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - pagination?: ReturnType; - }): QueryGetRecordExpiryQueue { - const message = new QueryGetRecordExpiryQueue({}); - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - pagination?: ReturnType; - } = {}; - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_pagination) - writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetRecordExpiryQueue { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetRecordExpiryQueue(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetRecordExpiryQueue { - return QueryGetRecordExpiryQueue.deserialize(bytes); - } - } - export class QueryGetRecordExpiryQueueResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - records?: ExpiryQueueRecord[]; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("records" in data && data.records != undefined) { - this.records = data.records; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get records() { - return pb_1.Message.getRepeatedWrapperField(this, ExpiryQueueRecord, 1) as ExpiryQueueRecord[]; - } - set records(value: ExpiryQueueRecord[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - records?: ReturnType[]; - pagination?: ReturnType; - }): QueryGetRecordExpiryQueueResponse { - const message = new QueryGetRecordExpiryQueueResponse({}); - if (data.records != null) { - message.records = data.records.map(item => ExpiryQueueRecord.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - records?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.records != null) { - data.records = this.records.map((item: ExpiryQueueRecord) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.records.length) - writer.writeRepeatedMessage(1, this.records, (item: ExpiryQueueRecord) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetRecordExpiryQueueResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetRecordExpiryQueueResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ExpiryQueueRecord.deserialize(reader), ExpiryQueueRecord)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetRecordExpiryQueueResponse { - return QueryGetRecordExpiryQueueResponse.deserialize(bytes); - } - } - export class ExpiryQueueRecord extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - value?: string[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("value" in data && data.value != undefined) { - this.value = data.value; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get value() { - return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; - } - set value(value: string[]) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - id?: string; - value?: string[]; - }): ExpiryQueueRecord { - const message = new ExpiryQueueRecord({}); - if (data.id != null) { - message.id = data.id; - } - if (data.value != null) { - message.value = data.value; - } - return message; - } - toObject() { - const data: { - id?: string; - value?: string[]; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.value != null) { - data.value = this.value; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.value.length) - writer.writeRepeatedString(2, this.value); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExpiryQueueRecord { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ExpiryQueueRecord(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - pb_1.Message.addToRepeatedField(message, 2, reader.readString()); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ExpiryQueueRecord { - return ExpiryQueueRecord.deserialize(bytes); - } - } - export class QueryGetAuthorityExpiryQueue extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_3.cosmos.base.query.v1beta1.PageRequest; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - pagination?: ReturnType; - }): QueryGetAuthorityExpiryQueue { - const message = new QueryGetAuthorityExpiryQueue({}); - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - pagination?: ReturnType; - } = {}; - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_pagination) - writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetAuthorityExpiryQueue { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetAuthorityExpiryQueue(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetAuthorityExpiryQueue { - return QueryGetAuthorityExpiryQueue.deserialize(bytes); - } - } - export class QueryGetAuthorityExpiryQueueResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - authorities?: ExpiryQueueRecord[]; - pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("authorities" in data && data.authorities != undefined) { - this.authorities = data.authorities; - } - if ("pagination" in data && data.pagination != undefined) { - this.pagination = data.pagination; - } - } - } - get authorities() { - return pb_1.Message.getRepeatedWrapperField(this, ExpiryQueueRecord, 1) as ExpiryQueueRecord[]; - } - set authorities(value: ExpiryQueueRecord[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get pagination() { - return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_3.cosmos.base.query.v1beta1.PageResponse; - } - set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_pagination() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - authorities?: ReturnType[]; - pagination?: ReturnType; - }): QueryGetAuthorityExpiryQueueResponse { - const message = new QueryGetAuthorityExpiryQueueResponse({}); - if (data.authorities != null) { - message.authorities = data.authorities.map(item => ExpiryQueueRecord.fromObject(item)); - } - if (data.pagination != null) { - message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); - } - return message; - } - toObject() { - const data: { - authorities?: ReturnType[]; - pagination?: ReturnType; - } = {}; - if (this.authorities != null) { - data.authorities = this.authorities.map((item: ExpiryQueueRecord) => item.toObject()); - } - if (this.pagination != null) { - data.pagination = this.pagination.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.authorities.length) - writer.writeRepeatedMessage(1, this.authorities, (item: ExpiryQueueRecord) => item.serialize(writer)); - if (this.has_pagination) - writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetAuthorityExpiryQueueResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetAuthorityExpiryQueueResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.authorities, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ExpiryQueueRecord.deserialize(reader), ExpiryQueueRecord)); - break; - case 2: - reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): QueryGetAuthorityExpiryQueueResponse { - return QueryGetAuthorityExpiryQueueResponse.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/registry/v1beta1/registry.ts b/src/proto/vulcanize/registry/v1beta1/registry.ts deleted file mode 100644 index 5b793be..0000000 --- a/src/proto/vulcanize/registry/v1beta1/registry.ts +++ /dev/null @@ -1,1531 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/registry/v1beta1/registry.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../google/protobuf/duration"; -import * as dependency_2 from "./../../../google/protobuf/timestamp"; -import * as dependency_3 from "./../../../gogoproto/gogo"; -import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.registry.v1beta1 { - export class Params extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record_rent?: dependency_4.cosmos.base.v1beta1.Coin; - record_rent_duration?: dependency_1.google.protobuf.Duration; - authority_rent?: dependency_4.cosmos.base.v1beta1.Coin; - authority_rent_duration?: dependency_1.google.protobuf.Duration; - authority_grace_period?: dependency_1.google.protobuf.Duration; - authority_auction_enabled?: boolean; - authority_auction_commits_duration?: dependency_1.google.protobuf.Duration; - authority_auction_reveals_duration?: dependency_1.google.protobuf.Duration; - authority_auction_commit_fee?: dependency_4.cosmos.base.v1beta1.Coin; - authority_auction_reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin; - authority_auction_minimum_bid?: dependency_4.cosmos.base.v1beta1.Coin; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record_rent" in data && data.record_rent != undefined) { - this.record_rent = data.record_rent; - } - if ("record_rent_duration" in data && data.record_rent_duration != undefined) { - this.record_rent_duration = data.record_rent_duration; - } - if ("authority_rent" in data && data.authority_rent != undefined) { - this.authority_rent = data.authority_rent; - } - if ("authority_rent_duration" in data && data.authority_rent_duration != undefined) { - this.authority_rent_duration = data.authority_rent_duration; - } - if ("authority_grace_period" in data && data.authority_grace_period != undefined) { - this.authority_grace_period = data.authority_grace_period; - } - if ("authority_auction_enabled" in data && data.authority_auction_enabled != undefined) { - this.authority_auction_enabled = data.authority_auction_enabled; - } - if ("authority_auction_commits_duration" in data && data.authority_auction_commits_duration != undefined) { - this.authority_auction_commits_duration = data.authority_auction_commits_duration; - } - if ("authority_auction_reveals_duration" in data && data.authority_auction_reveals_duration != undefined) { - this.authority_auction_reveals_duration = data.authority_auction_reveals_duration; - } - if ("authority_auction_commit_fee" in data && data.authority_auction_commit_fee != undefined) { - this.authority_auction_commit_fee = data.authority_auction_commit_fee; - } - if ("authority_auction_reveal_fee" in data && data.authority_auction_reveal_fee != undefined) { - this.authority_auction_reveal_fee = data.authority_auction_reveal_fee; - } - if ("authority_auction_minimum_bid" in data && data.authority_auction_minimum_bid != undefined) { - this.authority_auction_minimum_bid = data.authority_auction_minimum_bid; - } - } - } - get record_rent() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 1) as dependency_4.cosmos.base.v1beta1.Coin; - } - set record_rent(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_record_rent() { - return pb_1.Message.getField(this, 1) != null; - } - get record_rent_duration() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Duration, 2) as dependency_1.google.protobuf.Duration; - } - set record_rent_duration(value: dependency_1.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_record_rent_duration() { - return pb_1.Message.getField(this, 2) != null; - } - get authority_rent() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 3) as dependency_4.cosmos.base.v1beta1.Coin; - } - set authority_rent(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_authority_rent() { - return pb_1.Message.getField(this, 3) != null; - } - get authority_rent_duration() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Duration, 4) as dependency_1.google.protobuf.Duration; - } - set authority_rent_duration(value: dependency_1.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 4, value); - } - get has_authority_rent_duration() { - return pb_1.Message.getField(this, 4) != null; - } - get authority_grace_period() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Duration, 5) as dependency_1.google.protobuf.Duration; - } - set authority_grace_period(value: dependency_1.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 5, value); - } - get has_authority_grace_period() { - return pb_1.Message.getField(this, 5) != null; - } - get authority_auction_enabled() { - return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; - } - set authority_auction_enabled(value: boolean) { - pb_1.Message.setField(this, 6, value); - } - get authority_auction_commits_duration() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Duration, 7) as dependency_1.google.protobuf.Duration; - } - set authority_auction_commits_duration(value: dependency_1.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 7, value); - } - get has_authority_auction_commits_duration() { - return pb_1.Message.getField(this, 7) != null; - } - get authority_auction_reveals_duration() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Duration, 8) as dependency_1.google.protobuf.Duration; - } - set authority_auction_reveals_duration(value: dependency_1.google.protobuf.Duration) { - pb_1.Message.setWrapperField(this, 8, value); - } - get has_authority_auction_reveals_duration() { - return pb_1.Message.getField(this, 8) != null; - } - get authority_auction_commit_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9) as dependency_4.cosmos.base.v1beta1.Coin; - } - set authority_auction_commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 9, value); - } - get has_authority_auction_commit_fee() { - return pb_1.Message.getField(this, 9) != null; - } - get authority_auction_reveal_fee() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 10) as dependency_4.cosmos.base.v1beta1.Coin; - } - set authority_auction_reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 10, value); - } - get has_authority_auction_reveal_fee() { - return pb_1.Message.getField(this, 10) != null; - } - get authority_auction_minimum_bid() { - return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 11) as dependency_4.cosmos.base.v1beta1.Coin; - } - set authority_auction_minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin) { - pb_1.Message.setWrapperField(this, 11, value); - } - get has_authority_auction_minimum_bid() { - return pb_1.Message.getField(this, 11) != null; - } - static fromObject(data: { - record_rent?: ReturnType; - record_rent_duration?: ReturnType; - authority_rent?: ReturnType; - authority_rent_duration?: ReturnType; - authority_grace_period?: ReturnType; - authority_auction_enabled?: boolean; - authority_auction_commits_duration?: ReturnType; - authority_auction_reveals_duration?: ReturnType; - authority_auction_commit_fee?: ReturnType; - authority_auction_reveal_fee?: ReturnType; - authority_auction_minimum_bid?: ReturnType; - }): Params { - const message = new Params({}); - if (data.record_rent != null) { - message.record_rent = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.record_rent); - } - if (data.record_rent_duration != null) { - message.record_rent_duration = dependency_1.google.protobuf.Duration.fromObject(data.record_rent_duration); - } - if (data.authority_rent != null) { - message.authority_rent = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.authority_rent); - } - if (data.authority_rent_duration != null) { - message.authority_rent_duration = dependency_1.google.protobuf.Duration.fromObject(data.authority_rent_duration); - } - if (data.authority_grace_period != null) { - message.authority_grace_period = dependency_1.google.protobuf.Duration.fromObject(data.authority_grace_period); - } - if (data.authority_auction_enabled != null) { - message.authority_auction_enabled = data.authority_auction_enabled; - } - if (data.authority_auction_commits_duration != null) { - message.authority_auction_commits_duration = dependency_1.google.protobuf.Duration.fromObject(data.authority_auction_commits_duration); - } - if (data.authority_auction_reveals_duration != null) { - message.authority_auction_reveals_duration = dependency_1.google.protobuf.Duration.fromObject(data.authority_auction_reveals_duration); - } - if (data.authority_auction_commit_fee != null) { - message.authority_auction_commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.authority_auction_commit_fee); - } - if (data.authority_auction_reveal_fee != null) { - message.authority_auction_reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.authority_auction_reveal_fee); - } - if (data.authority_auction_minimum_bid != null) { - message.authority_auction_minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.authority_auction_minimum_bid); - } - return message; - } - toObject() { - const data: { - record_rent?: ReturnType; - record_rent_duration?: ReturnType; - authority_rent?: ReturnType; - authority_rent_duration?: ReturnType; - authority_grace_period?: ReturnType; - authority_auction_enabled?: boolean; - authority_auction_commits_duration?: ReturnType; - authority_auction_reveals_duration?: ReturnType; - authority_auction_commit_fee?: ReturnType; - authority_auction_reveal_fee?: ReturnType; - authority_auction_minimum_bid?: ReturnType; - } = {}; - if (this.record_rent != null) { - data.record_rent = this.record_rent.toObject(); - } - if (this.record_rent_duration != null) { - data.record_rent_duration = this.record_rent_duration.toObject(); - } - if (this.authority_rent != null) { - data.authority_rent = this.authority_rent.toObject(); - } - if (this.authority_rent_duration != null) { - data.authority_rent_duration = this.authority_rent_duration.toObject(); - } - if (this.authority_grace_period != null) { - data.authority_grace_period = this.authority_grace_period.toObject(); - } - if (this.authority_auction_enabled != null) { - data.authority_auction_enabled = this.authority_auction_enabled; - } - if (this.authority_auction_commits_duration != null) { - data.authority_auction_commits_duration = this.authority_auction_commits_duration.toObject(); - } - if (this.authority_auction_reveals_duration != null) { - data.authority_auction_reveals_duration = this.authority_auction_reveals_duration.toObject(); - } - if (this.authority_auction_commit_fee != null) { - data.authority_auction_commit_fee = this.authority_auction_commit_fee.toObject(); - } - if (this.authority_auction_reveal_fee != null) { - data.authority_auction_reveal_fee = this.authority_auction_reveal_fee.toObject(); - } - if (this.authority_auction_minimum_bid != null) { - data.authority_auction_minimum_bid = this.authority_auction_minimum_bid.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_record_rent) - writer.writeMessage(1, this.record_rent, () => this.record_rent.serialize(writer)); - if (this.has_record_rent_duration) - writer.writeMessage(2, this.record_rent_duration, () => this.record_rent_duration.serialize(writer)); - if (this.has_authority_rent) - writer.writeMessage(3, this.authority_rent, () => this.authority_rent.serialize(writer)); - if (this.has_authority_rent_duration) - writer.writeMessage(4, this.authority_rent_duration, () => this.authority_rent_duration.serialize(writer)); - if (this.has_authority_grace_period) - writer.writeMessage(5, this.authority_grace_period, () => this.authority_grace_period.serialize(writer)); - if (this.authority_auction_enabled != false) - writer.writeBool(6, this.authority_auction_enabled); - if (this.has_authority_auction_commits_duration) - writer.writeMessage(7, this.authority_auction_commits_duration, () => this.authority_auction_commits_duration.serialize(writer)); - if (this.has_authority_auction_reveals_duration) - writer.writeMessage(8, this.authority_auction_reveals_duration, () => this.authority_auction_reveals_duration.serialize(writer)); - if (this.has_authority_auction_commit_fee) - writer.writeMessage(9, this.authority_auction_commit_fee, () => this.authority_auction_commit_fee.serialize(writer)); - if (this.has_authority_auction_reveal_fee) - writer.writeMessage(10, this.authority_auction_reveal_fee, () => this.authority_auction_reveal_fee.serialize(writer)); - if (this.has_authority_auction_minimum_bid) - writer.writeMessage(11, this.authority_auction_minimum_bid, () => this.authority_auction_minimum_bid.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.record_rent, () => message.record_rent = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 2: - reader.readMessage(message.record_rent_duration, () => message.record_rent_duration = dependency_1.google.protobuf.Duration.deserialize(reader)); - break; - case 3: - reader.readMessage(message.authority_rent, () => message.authority_rent = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 4: - reader.readMessage(message.authority_rent_duration, () => message.authority_rent_duration = dependency_1.google.protobuf.Duration.deserialize(reader)); - break; - case 5: - reader.readMessage(message.authority_grace_period, () => message.authority_grace_period = dependency_1.google.protobuf.Duration.deserialize(reader)); - break; - case 6: - message.authority_auction_enabled = reader.readBool(); - break; - case 7: - reader.readMessage(message.authority_auction_commits_duration, () => message.authority_auction_commits_duration = dependency_1.google.protobuf.Duration.deserialize(reader)); - break; - case 8: - reader.readMessage(message.authority_auction_reveals_duration, () => message.authority_auction_reveals_duration = dependency_1.google.protobuf.Duration.deserialize(reader)); - break; - case 9: - reader.readMessage(message.authority_auction_commit_fee, () => message.authority_auction_commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 10: - reader.readMessage(message.authority_auction_reveal_fee, () => message.authority_auction_reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - case 11: - reader.readMessage(message.authority_auction_minimum_bid, () => message.authority_auction_minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Params { - return Params.deserialize(bytes); - } - } - export class Record extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - bond_id?: string; - create_time?: string; - expiry_time?: string; - deleted?: boolean; - owners?: string[]; - attributes?: Uint8Array; - names?: string[]; - type?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 8], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("bond_id" in data && data.bond_id != undefined) { - this.bond_id = data.bond_id; - } - if ("create_time" in data && data.create_time != undefined) { - this.create_time = data.create_time; - } - if ("expiry_time" in data && data.expiry_time != undefined) { - this.expiry_time = data.expiry_time; - } - if ("deleted" in data && data.deleted != undefined) { - this.deleted = data.deleted; - } - if ("owners" in data && data.owners != undefined) { - this.owners = data.owners; - } - if ("attributes" in data && data.attributes != undefined) { - this.attributes = data.attributes; - } - if ("names" in data && data.names != undefined) { - this.names = data.names; - } - if ("type" in data && data.type != undefined) { - this.type = data.type; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get bond_id() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set bond_id(value: string) { - pb_1.Message.setField(this, 2, value); - } - get create_time() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set create_time(value: string) { - pb_1.Message.setField(this, 3, value); - } - get expiry_time() { - return pb_1.Message.getFieldWithDefault(this, 4, "") as string; - } - set expiry_time(value: string) { - pb_1.Message.setField(this, 4, value); - } - get deleted() { - return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; - } - set deleted(value: boolean) { - pb_1.Message.setField(this, 5, value); - } - get owners() { - return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; - } - set owners(value: string[]) { - pb_1.Message.setField(this, 6, value); - } - get attributes() { - return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; - } - set attributes(value: Uint8Array) { - pb_1.Message.setField(this, 7, value); - } - get names() { - return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; - } - set names(value: string[]) { - pb_1.Message.setField(this, 8, value); - } - get type() { - return pb_1.Message.getFieldWithDefault(this, 9, "") as string; - } - set type(value: string) { - pb_1.Message.setField(this, 9, value); - } - static fromObject(data: { - id?: string; - bond_id?: string; - create_time?: string; - expiry_time?: string; - deleted?: boolean; - owners?: string[]; - attributes?: Uint8Array; - names?: string[]; - type?: string; - }): Record { - const message = new Record({}); - if (data.id != null) { - message.id = data.id; - } - if (data.bond_id != null) { - message.bond_id = data.bond_id; - } - if (data.create_time != null) { - message.create_time = data.create_time; - } - if (data.expiry_time != null) { - message.expiry_time = data.expiry_time; - } - if (data.deleted != null) { - message.deleted = data.deleted; - } - if (data.owners != null) { - message.owners = data.owners; - } - if (data.attributes != null) { - message.attributes = data.attributes; - } - if (data.names != null) { - message.names = data.names; - } - if (data.type != null) { - message.type = data.type; - } - return message; - } - toObject() { - const data: { - id?: string; - bond_id?: string; - create_time?: string; - expiry_time?: string; - deleted?: boolean; - owners?: string[]; - attributes?: Uint8Array; - names?: string[]; - type?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.bond_id != null) { - data.bond_id = this.bond_id; - } - if (this.create_time != null) { - data.create_time = this.create_time; - } - if (this.expiry_time != null) { - data.expiry_time = this.expiry_time; - } - if (this.deleted != null) { - data.deleted = this.deleted; - } - if (this.owners != null) { - data.owners = this.owners; - } - if (this.attributes != null) { - data.attributes = this.attributes; - } - if (this.names != null) { - data.names = this.names; - } - if (this.type != null) { - data.type = this.type; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.bond_id.length) - writer.writeString(2, this.bond_id); - if (this.create_time.length) - writer.writeString(3, this.create_time); - if (this.expiry_time.length) - writer.writeString(4, this.expiry_time); - if (this.deleted != false) - writer.writeBool(5, this.deleted); - if (this.owners.length) - writer.writeRepeatedString(6, this.owners); - if (this.attributes.length) - writer.writeBytes(7, this.attributes); - if (this.names.length) - writer.writeRepeatedString(8, this.names); - if (this.type.length) - writer.writeString(9, this.type); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Record { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Record(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.bond_id = reader.readString(); - break; - case 3: - message.create_time = reader.readString(); - break; - case 4: - message.expiry_time = reader.readString(); - break; - case 5: - message.deleted = reader.readBool(); - break; - case 6: - pb_1.Message.addToRepeatedField(message, 6, reader.readString()); - break; - case 7: - message.attributes = reader.readBytes(); - break; - case 8: - pb_1.Message.addToRepeatedField(message, 8, reader.readString()); - break; - case 9: - message.type = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Record { - return Record.deserialize(bytes); - } - } - export class AuthorityEntry extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - entry?: NameAuthority; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("entry" in data && data.entry != undefined) { - this.entry = data.entry; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get entry() { - return pb_1.Message.getWrapperField(this, NameAuthority, 2) as NameAuthority; - } - set entry(value: NameAuthority) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_entry() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - name?: string; - entry?: ReturnType; - }): AuthorityEntry { - const message = new AuthorityEntry({}); - if (data.name != null) { - message.name = data.name; - } - if (data.entry != null) { - message.entry = NameAuthority.fromObject(data.entry); - } - return message; - } - toObject() { - const data: { - name?: string; - entry?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.entry != null) { - data.entry = this.entry.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.name.length) - writer.writeString(1, this.name); - if (this.has_entry) - writer.writeMessage(2, this.entry, () => this.entry.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthorityEntry { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuthorityEntry(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage(message.entry, () => message.entry = NameAuthority.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuthorityEntry { - return AuthorityEntry.deserialize(bytes); - } - } - export class NameAuthority extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - owner_public_key?: string; - owner_address?: string; - height?: number; - status?: string; - auction_id?: string; - bond_id?: string; - expiry_time?: dependency_2.google.protobuf.Timestamp; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("owner_public_key" in data && data.owner_public_key != undefined) { - this.owner_public_key = data.owner_public_key; - } - if ("owner_address" in data && data.owner_address != undefined) { - this.owner_address = data.owner_address; - } - if ("height" in data && data.height != undefined) { - this.height = data.height; - } - if ("status" in data && data.status != undefined) { - this.status = data.status; - } - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - if ("bond_id" in data && data.bond_id != undefined) { - this.bond_id = data.bond_id; - } - if ("expiry_time" in data && data.expiry_time != undefined) { - this.expiry_time = data.expiry_time; - } - } - } - get owner_public_key() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set owner_public_key(value: string) { - pb_1.Message.setField(this, 1, value); - } - get owner_address() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set owner_address(value: string) { - pb_1.Message.setField(this, 2, value); - } - get height() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set height(value: number) { - pb_1.Message.setField(this, 3, value); - } - get status() { - return pb_1.Message.getFieldWithDefault(this, 4, "") as string; - } - set status(value: string) { - pb_1.Message.setField(this, 4, value); - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 5, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 5, value); - } - get bond_id() { - return pb_1.Message.getFieldWithDefault(this, 6, "") as string; - } - set bond_id(value: string) { - pb_1.Message.setField(this, 6, value); - } - get expiry_time() { - return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 7) as dependency_2.google.protobuf.Timestamp; - } - set expiry_time(value: dependency_2.google.protobuf.Timestamp) { - pb_1.Message.setWrapperField(this, 7, value); - } - get has_expiry_time() { - return pb_1.Message.getField(this, 7) != null; - } - static fromObject(data: { - owner_public_key?: string; - owner_address?: string; - height?: number; - status?: string; - auction_id?: string; - bond_id?: string; - expiry_time?: ReturnType; - }): NameAuthority { - const message = new NameAuthority({}); - if (data.owner_public_key != null) { - message.owner_public_key = data.owner_public_key; - } - if (data.owner_address != null) { - message.owner_address = data.owner_address; - } - if (data.height != null) { - message.height = data.height; - } - if (data.status != null) { - message.status = data.status; - } - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - if (data.bond_id != null) { - message.bond_id = data.bond_id; - } - if (data.expiry_time != null) { - message.expiry_time = dependency_2.google.protobuf.Timestamp.fromObject(data.expiry_time); - } - return message; - } - toObject() { - const data: { - owner_public_key?: string; - owner_address?: string; - height?: number; - status?: string; - auction_id?: string; - bond_id?: string; - expiry_time?: ReturnType; - } = {}; - if (this.owner_public_key != null) { - data.owner_public_key = this.owner_public_key; - } - if (this.owner_address != null) { - data.owner_address = this.owner_address; - } - if (this.height != null) { - data.height = this.height; - } - if (this.status != null) { - data.status = this.status; - } - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - if (this.bond_id != null) { - data.bond_id = this.bond_id; - } - if (this.expiry_time != null) { - data.expiry_time = this.expiry_time.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.owner_public_key.length) - writer.writeString(1, this.owner_public_key); - if (this.owner_address.length) - writer.writeString(2, this.owner_address); - if (this.height != 0) - writer.writeUint64(3, this.height); - if (this.status.length) - writer.writeString(4, this.status); - if (this.auction_id.length) - writer.writeString(5, this.auction_id); - if (this.bond_id.length) - writer.writeString(6, this.bond_id); - if (this.has_expiry_time) - writer.writeMessage(7, this.expiry_time, () => this.expiry_time.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameAuthority { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NameAuthority(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.owner_public_key = reader.readString(); - break; - case 2: - message.owner_address = reader.readString(); - break; - case 3: - message.height = reader.readUint64(); - break; - case 4: - message.status = reader.readString(); - break; - case 5: - message.auction_id = reader.readString(); - break; - case 6: - message.bond_id = reader.readString(); - break; - case 7: - reader.readMessage(message.expiry_time, () => message.expiry_time = dependency_2.google.protobuf.Timestamp.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): NameAuthority { - return NameAuthority.deserialize(bytes); - } - } - export class NameEntry extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - entry?: NameRecord; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("entry" in data && data.entry != undefined) { - this.entry = data.entry; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get entry() { - return pb_1.Message.getWrapperField(this, NameRecord, 2) as NameRecord; - } - set entry(value: NameRecord) { - pb_1.Message.setWrapperField(this, 2, value); - } - get has_entry() { - return pb_1.Message.getField(this, 2) != null; - } - static fromObject(data: { - name?: string; - entry?: ReturnType; - }): NameEntry { - const message = new NameEntry({}); - if (data.name != null) { - message.name = data.name; - } - if (data.entry != null) { - message.entry = NameRecord.fromObject(data.entry); - } - return message; - } - toObject() { - const data: { - name?: string; - entry?: ReturnType; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.entry != null) { - data.entry = this.entry.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.name.length) - writer.writeString(1, this.name); - if (this.has_entry) - writer.writeMessage(2, this.entry, () => this.entry.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameEntry { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NameEntry(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - reader.readMessage(message.entry, () => message.entry = NameRecord.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): NameEntry { - return NameEntry.deserialize(bytes); - } - } - export class NameRecord extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - latest?: NameRecordEntry; - history?: NameRecordEntry[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("latest" in data && data.latest != undefined) { - this.latest = data.latest; - } - if ("history" in data && data.history != undefined) { - this.history = data.history; - } - } - } - get latest() { - return pb_1.Message.getWrapperField(this, NameRecordEntry, 1) as NameRecordEntry; - } - set latest(value: NameRecordEntry) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_latest() { - return pb_1.Message.getField(this, 1) != null; - } - get history() { - return pb_1.Message.getRepeatedWrapperField(this, NameRecordEntry, 2) as NameRecordEntry[]; - } - set history(value: NameRecordEntry[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - static fromObject(data: { - latest?: ReturnType; - history?: ReturnType[]; - }): NameRecord { - const message = new NameRecord({}); - if (data.latest != null) { - message.latest = NameRecordEntry.fromObject(data.latest); - } - if (data.history != null) { - message.history = data.history.map(item => NameRecordEntry.fromObject(item)); - } - return message; - } - toObject() { - const data: { - latest?: ReturnType; - history?: ReturnType[]; - } = {}; - if (this.latest != null) { - data.latest = this.latest.toObject(); - } - if (this.history != null) { - data.history = this.history.map((item: NameRecordEntry) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_latest) - writer.writeMessage(1, this.latest, () => this.latest.serialize(writer)); - if (this.history.length) - writer.writeRepeatedMessage(2, this.history, (item: NameRecordEntry) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameRecord { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NameRecord(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.latest, () => message.latest = NameRecordEntry.deserialize(reader)); - break; - case 2: - reader.readMessage(message.history, () => pb_1.Message.addToRepeatedWrapperField(message, 2, NameRecordEntry.deserialize(reader), NameRecordEntry)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): NameRecord { - return NameRecord.deserialize(bytes); - } - } - export class NameRecordEntry extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - height?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - if ("height" in data && data.height != undefined) { - this.height = data.height; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get height() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set height(value: number) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - id?: string; - height?: number; - }): NameRecordEntry { - const message = new NameRecordEntry({}); - if (data.id != null) { - message.id = data.id; - } - if (data.height != null) { - message.height = data.height; - } - return message; - } - toObject() { - const data: { - id?: string; - height?: number; - } = {}; - if (this.id != null) { - data.id = this.id; - } - if (this.height != null) { - data.height = this.height; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (this.height != 0) - writer.writeUint64(2, this.height); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameRecordEntry { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new NameRecordEntry(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - case 2: - message.height = reader.readUint64(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): NameRecordEntry { - return NameRecordEntry.deserialize(bytes); - } - } - export class Signature extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - sig?: string; - pub_key?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("sig" in data && data.sig != undefined) { - this.sig = data.sig; - } - if ("pub_key" in data && data.pub_key != undefined) { - this.pub_key = data.pub_key; - } - } - } - get sig() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set sig(value: string) { - pb_1.Message.setField(this, 1, value); - } - get pub_key() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set pub_key(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - sig?: string; - pub_key?: string; - }): Signature { - const message = new Signature({}); - if (data.sig != null) { - message.sig = data.sig; - } - if (data.pub_key != null) { - message.pub_key = data.pub_key; - } - return message; - } - toObject() { - const data: { - sig?: string; - pub_key?: string; - } = {}; - if (this.sig != null) { - data.sig = this.sig; - } - if (this.pub_key != null) { - data.pub_key = this.pub_key; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.sig.length) - writer.writeString(1, this.sig); - if (this.pub_key.length) - writer.writeString(2, this.pub_key); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signature { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Signature(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.sig = reader.readString(); - break; - case 2: - message.pub_key = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Signature { - return Signature.deserialize(bytes); - } - } - export class BlockChangeSet extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - height?: number; - records?: string[]; - auctions?: string[]; - auction_bids?: AuctionBidInfo[]; - authorities?: string[]; - names?: string[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 5, 6], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("height" in data && data.height != undefined) { - this.height = data.height; - } - if ("records" in data && data.records != undefined) { - this.records = data.records; - } - if ("auctions" in data && data.auctions != undefined) { - this.auctions = data.auctions; - } - if ("auction_bids" in data && data.auction_bids != undefined) { - this.auction_bids = data.auction_bids; - } - if ("authorities" in data && data.authorities != undefined) { - this.authorities = data.authorities; - } - if ("names" in data && data.names != undefined) { - this.names = data.names; - } - } - } - get height() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set height(value: number) { - pb_1.Message.setField(this, 1, value); - } - get records() { - return pb_1.Message.getFieldWithDefault(this, 2, []) as string[]; - } - set records(value: string[]) { - pb_1.Message.setField(this, 2, value); - } - get auctions() { - return pb_1.Message.getFieldWithDefault(this, 3, []) as string[]; - } - set auctions(value: string[]) { - pb_1.Message.setField(this, 3, value); - } - get auction_bids() { - return pb_1.Message.getRepeatedWrapperField(this, AuctionBidInfo, 4) as AuctionBidInfo[]; - } - set auction_bids(value: AuctionBidInfo[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); - } - get authorities() { - return pb_1.Message.getFieldWithDefault(this, 5, []) as string[]; - } - set authorities(value: string[]) { - pb_1.Message.setField(this, 5, value); - } - get names() { - return pb_1.Message.getFieldWithDefault(this, 6, []) as string[]; - } - set names(value: string[]) { - pb_1.Message.setField(this, 6, value); - } - static fromObject(data: { - height?: number; - records?: string[]; - auctions?: string[]; - auction_bids?: ReturnType[]; - authorities?: string[]; - names?: string[]; - }): BlockChangeSet { - const message = new BlockChangeSet({}); - if (data.height != null) { - message.height = data.height; - } - if (data.records != null) { - message.records = data.records; - } - if (data.auctions != null) { - message.auctions = data.auctions; - } - if (data.auction_bids != null) { - message.auction_bids = data.auction_bids.map(item => AuctionBidInfo.fromObject(item)); - } - if (data.authorities != null) { - message.authorities = data.authorities; - } - if (data.names != null) { - message.names = data.names; - } - return message; - } - toObject() { - const data: { - height?: number; - records?: string[]; - auctions?: string[]; - auction_bids?: ReturnType[]; - authorities?: string[]; - names?: string[]; - } = {}; - if (this.height != null) { - data.height = this.height; - } - if (this.records != null) { - data.records = this.records; - } - if (this.auctions != null) { - data.auctions = this.auctions; - } - if (this.auction_bids != null) { - data.auction_bids = this.auction_bids.map((item: AuctionBidInfo) => item.toObject()); - } - if (this.authorities != null) { - data.authorities = this.authorities; - } - if (this.names != null) { - data.names = this.names; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.height != 0) - writer.writeInt64(1, this.height); - if (this.records.length) - writer.writeRepeatedString(2, this.records); - if (this.auctions.length) - writer.writeRepeatedString(3, this.auctions); - if (this.auction_bids.length) - writer.writeRepeatedMessage(4, this.auction_bids, (item: AuctionBidInfo) => item.serialize(writer)); - if (this.authorities.length) - writer.writeRepeatedString(5, this.authorities); - if (this.names.length) - writer.writeRepeatedString(6, this.names); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockChangeSet { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BlockChangeSet(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.height = reader.readInt64(); - break; - case 2: - pb_1.Message.addToRepeatedField(message, 2, reader.readString()); - break; - case 3: - pb_1.Message.addToRepeatedField(message, 3, reader.readString()); - break; - case 4: - reader.readMessage(message.auction_bids, () => pb_1.Message.addToRepeatedWrapperField(message, 4, AuctionBidInfo.deserialize(reader), AuctionBidInfo)); - break; - case 5: - pb_1.Message.addToRepeatedField(message, 5, reader.readString()); - break; - case 6: - pb_1.Message.addToRepeatedField(message, 6, reader.readString()); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BlockChangeSet { - return BlockChangeSet.deserialize(bytes); - } - } - export class AuctionBidInfo extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - auction_id?: string; - bidder_address?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("auction_id" in data && data.auction_id != undefined) { - this.auction_id = data.auction_id; - } - if ("bidder_address" in data && data.bidder_address != undefined) { - this.bidder_address = data.bidder_address; - } - } - } - get auction_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set auction_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get bidder_address() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set bidder_address(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - auction_id?: string; - bidder_address?: string; - }): AuctionBidInfo { - const message = new AuctionBidInfo({}); - if (data.auction_id != null) { - message.auction_id = data.auction_id; - } - if (data.bidder_address != null) { - message.bidder_address = data.bidder_address; - } - return message; - } - toObject() { - const data: { - auction_id?: string; - bidder_address?: string; - } = {}; - if (this.auction_id != null) { - data.auction_id = this.auction_id; - } - if (this.bidder_address != null) { - data.bidder_address = this.bidder_address; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.auction_id.length) - writer.writeString(1, this.auction_id); - if (this.bidder_address.length) - writer.writeString(2, this.bidder_address); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionBidInfo { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionBidInfo(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.auction_id = reader.readString(); - break; - case 2: - message.bidder_address = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): AuctionBidInfo { - return AuctionBidInfo.deserialize(bytes); - } - } -} diff --git a/src/proto/vulcanize/registry/v1beta1/tx.ts b/src/proto/vulcanize/registry/v1beta1/tx.ts deleted file mode 100644 index bf577ce..0000000 --- a/src/proto/vulcanize/registry/v1beta1/tx.ts +++ /dev/null @@ -1,1573 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 4.25.1 - * source: vulcanize/registry/v1beta1/tx.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../../../gogoproto/gogo"; -import * as dependency_2 from "./registry"; -import * as pb_1 from "google-protobuf"; -export namespace vulcanize.registry.v1beta1 { - export class MsgSetRecord extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bond_id?: string; - signer?: string; - payload?: Payload; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bond_id" in data && data.bond_id != undefined) { - this.bond_id = data.bond_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - if ("payload" in data && data.payload != undefined) { - this.payload = data.payload; - } - } - } - get bond_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set bond_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - get payload() { - return pb_1.Message.getWrapperField(this, Payload, 3) as Payload; - } - set payload(value: Payload) { - pb_1.Message.setWrapperField(this, 3, value); - } - get has_payload() { - return pb_1.Message.getField(this, 3) != null; - } - static fromObject(data: { - bond_id?: string; - signer?: string; - payload?: ReturnType; - }): MsgSetRecord { - const message = new MsgSetRecord({}); - if (data.bond_id != null) { - message.bond_id = data.bond_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - if (data.payload != null) { - message.payload = Payload.fromObject(data.payload); - } - return message; - } - toObject() { - const data: { - bond_id?: string; - signer?: string; - payload?: ReturnType; - } = {}; - if (this.bond_id != null) { - data.bond_id = this.bond_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - if (this.payload != null) { - data.payload = this.payload.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.bond_id.length) - writer.writeString(1, this.bond_id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (this.has_payload) - writer.writeMessage(3, this.payload, () => this.payload.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetRecord { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetRecord(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.bond_id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - case 3: - reader.readMessage(message.payload, () => message.payload = Payload.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgSetRecord { - return MsgSetRecord.deserialize(bytes); - } - } - export class MsgSetRecordResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - id?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("id" in data && data.id != undefined) { - this.id = data.id; - } - } - } - get id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set id(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - id?: string; - }): MsgSetRecordResponse { - const message = new MsgSetRecordResponse({}); - if (data.id != null) { - message.id = data.id; - } - return message; - } - toObject() { - const data: { - id?: string; - } = {}; - if (this.id != null) { - data.id = this.id; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.id.length) - writer.writeString(1, this.id); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetRecordResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetRecordResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.id = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgSetRecordResponse { - return MsgSetRecordResponse.deserialize(bytes); - } - } - export class Payload extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record?: dependency_2.vulcanize.registry.v1beta1.Record; - signatures?: dependency_2.vulcanize.registry.v1beta1.Signature[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record" in data && data.record != undefined) { - this.record = data.record; - } - if ("signatures" in data && data.signatures != undefined) { - this.signatures = data.signatures; - } - } - } - get record() { - return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.registry.v1beta1.Record, 1) as dependency_2.vulcanize.registry.v1beta1.Record; - } - set record(value: dependency_2.vulcanize.registry.v1beta1.Record) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_record() { - return pb_1.Message.getField(this, 1) != null; - } - get signatures() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.Signature, 2) as dependency_2.vulcanize.registry.v1beta1.Signature[]; - } - set signatures(value: dependency_2.vulcanize.registry.v1beta1.Signature[]) { - pb_1.Message.setRepeatedWrapperField(this, 2, value); - } - static fromObject(data: { - record?: ReturnType; - signatures?: ReturnType[]; - }): Payload { - const message = new Payload({}); - if (data.record != null) { - message.record = dependency_2.vulcanize.registry.v1beta1.Record.fromObject(data.record); - } - if (data.signatures != null) { - message.signatures = data.signatures.map(item => dependency_2.vulcanize.registry.v1beta1.Signature.fromObject(item)); - } - return message; - } - toObject() { - const data: { - record?: ReturnType; - signatures?: ReturnType[]; - } = {}; - if (this.record != null) { - data.record = this.record.toObject(); - } - if (this.signatures != null) { - data.signatures = this.signatures.map((item: dependency_2.vulcanize.registry.v1beta1.Signature) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_record) - writer.writeMessage(1, this.record, () => this.record.serialize(writer)); - if (this.signatures.length) - writer.writeRepeatedMessage(2, this.signatures, (item: dependency_2.vulcanize.registry.v1beta1.Signature) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Payload { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Payload(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.record, () => message.record = dependency_2.vulcanize.registry.v1beta1.Record.deserialize(reader)); - break; - case 2: - reader.readMessage(message.signatures, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.registry.v1beta1.Signature.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.Signature)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Payload { - return Payload.deserialize(bytes); - } - } - export class MsgSetName extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - crn?: string; - cid?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("crn" in data && data.crn != undefined) { - this.crn = data.crn; - } - if ("cid" in data && data.cid != undefined) { - this.cid = data.cid; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get crn() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set crn(value: string) { - pb_1.Message.setField(this, 1, value); - } - get cid() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set cid(value: string) { - pb_1.Message.setField(this, 2, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - crn?: string; - cid?: string; - signer?: string; - }): MsgSetName { - const message = new MsgSetName({}); - if (data.crn != null) { - message.crn = data.crn; - } - if (data.cid != null) { - message.cid = data.cid; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - crn?: string; - cid?: string; - signer?: string; - } = {}; - if (this.crn != null) { - data.crn = this.crn; - } - if (this.cid != null) { - data.cid = this.cid; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.crn.length) - writer.writeString(1, this.crn); - if (this.cid.length) - writer.writeString(2, this.cid); - if (this.signer.length) - writer.writeString(3, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetName { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetName(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.crn = reader.readString(); - break; - case 2: - message.cid = reader.readString(); - break; - case 3: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgSetName { - return MsgSetName.deserialize(bytes); - } - } - export class MsgSetNameResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgSetNameResponse { - const message = new MsgSetNameResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetNameResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetNameResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgSetNameResponse { - return MsgSetNameResponse.deserialize(bytes); - } - } - export class MsgReserveAuthority extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - signer?: string; - owner?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - if ("owner" in data && data.owner != undefined) { - this.owner = data.owner; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - get owner() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set owner(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - name?: string; - signer?: string; - owner?: string; - }): MsgReserveAuthority { - const message = new MsgReserveAuthority({}); - if (data.name != null) { - message.name = data.name; - } - if (data.signer != null) { - message.signer = data.signer; - } - if (data.owner != null) { - message.owner = data.owner; - } - return message; - } - toObject() { - const data: { - name?: string; - signer?: string; - owner?: string; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.signer != null) { - data.signer = this.signer; - } - if (this.owner != null) { - data.owner = this.owner; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.name.length) - writer.writeString(1, this.name); - if (this.signer.length) - writer.writeString(2, this.signer); - if (this.owner.length) - writer.writeString(3, this.owner); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReserveAuthority { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgReserveAuthority(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - case 3: - message.owner = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgReserveAuthority { - return MsgReserveAuthority.deserialize(bytes); - } - } - export class MsgReserveAuthorityResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgReserveAuthorityResponse { - const message = new MsgReserveAuthorityResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReserveAuthorityResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgReserveAuthorityResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgReserveAuthorityResponse { - return MsgReserveAuthorityResponse.deserialize(bytes); - } - } - export class MsgSetAuthorityBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - name?: string; - bond_id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("name" in data && data.name != undefined) { - this.name = data.name; - } - if ("bond_id" in data && data.bond_id != undefined) { - this.bond_id = data.bond_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get name() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set name(value: string) { - pb_1.Message.setField(this, 1, value); - } - get bond_id() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set bond_id(value: string) { - pb_1.Message.setField(this, 2, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - name?: string; - bond_id?: string; - signer?: string; - }): MsgSetAuthorityBond { - const message = new MsgSetAuthorityBond({}); - if (data.name != null) { - message.name = data.name; - } - if (data.bond_id != null) { - message.bond_id = data.bond_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - name?: string; - bond_id?: string; - signer?: string; - } = {}; - if (this.name != null) { - data.name = this.name; - } - if (this.bond_id != null) { - data.bond_id = this.bond_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.name.length) - writer.writeString(1, this.name); - if (this.bond_id.length) - writer.writeString(2, this.bond_id); - if (this.signer.length) - writer.writeString(3, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetAuthorityBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetAuthorityBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.name = reader.readString(); - break; - case 2: - message.bond_id = reader.readString(); - break; - case 3: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgSetAuthorityBond { - return MsgSetAuthorityBond.deserialize(bytes); - } - } - export class MsgSetAuthorityBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgSetAuthorityBondResponse { - const message = new MsgSetAuthorityBondResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetAuthorityBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgSetAuthorityBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgSetAuthorityBondResponse { - return MsgSetAuthorityBondResponse.deserialize(bytes); - } - } - export class MsgDeleteNameAuthority extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - crn?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("crn" in data && data.crn != undefined) { - this.crn = data.crn; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get crn() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set crn(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - crn?: string; - signer?: string; - }): MsgDeleteNameAuthority { - const message = new MsgDeleteNameAuthority({}); - if (data.crn != null) { - message.crn = data.crn; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - crn?: string; - signer?: string; - } = {}; - if (this.crn != null) { - data.crn = this.crn; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.crn.length) - writer.writeString(1, this.crn); - if (this.signer.length) - writer.writeString(2, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeleteNameAuthority { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDeleteNameAuthority(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.crn = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgDeleteNameAuthority { - return MsgDeleteNameAuthority.deserialize(bytes); - } - } - export class MsgDeleteNameAuthorityResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgDeleteNameAuthorityResponse { - const message = new MsgDeleteNameAuthorityResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeleteNameAuthorityResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDeleteNameAuthorityResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgDeleteNameAuthorityResponse { - return MsgDeleteNameAuthorityResponse.deserialize(bytes); - } - } - export class MsgRenewRecord extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record_id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record_id" in data && data.record_id != undefined) { - this.record_id = data.record_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get record_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set record_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - record_id?: string; - signer?: string; - }): MsgRenewRecord { - const message = new MsgRenewRecord({}); - if (data.record_id != null) { - message.record_id = data.record_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - record_id?: string; - signer?: string; - } = {}; - if (this.record_id != null) { - data.record_id = this.record_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.record_id.length) - writer.writeString(1, this.record_id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRenewRecord { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRenewRecord(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.record_id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgRenewRecord { - return MsgRenewRecord.deserialize(bytes); - } - } - export class MsgRenewRecordResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgRenewRecordResponse { - const message = new MsgRenewRecordResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRenewRecordResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRenewRecordResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgRenewRecordResponse { - return MsgRenewRecordResponse.deserialize(bytes); - } - } - export class MsgAssociateBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record_id?: string; - bond_id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record_id" in data && data.record_id != undefined) { - this.record_id = data.record_id; - } - if ("bond_id" in data && data.bond_id != undefined) { - this.bond_id = data.bond_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get record_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set record_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get bond_id() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set bond_id(value: string) { - pb_1.Message.setField(this, 2, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - record_id?: string; - bond_id?: string; - signer?: string; - }): MsgAssociateBond { - const message = new MsgAssociateBond({}); - if (data.record_id != null) { - message.record_id = data.record_id; - } - if (data.bond_id != null) { - message.bond_id = data.bond_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - record_id?: string; - bond_id?: string; - signer?: string; - } = {}; - if (this.record_id != null) { - data.record_id = this.record_id; - } - if (this.bond_id != null) { - data.bond_id = this.bond_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.record_id.length) - writer.writeString(1, this.record_id); - if (this.bond_id.length) - writer.writeString(2, this.bond_id); - if (this.signer.length) - writer.writeString(3, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAssociateBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgAssociateBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.record_id = reader.readString(); - break; - case 2: - message.bond_id = reader.readString(); - break; - case 3: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgAssociateBond { - return MsgAssociateBond.deserialize(bytes); - } - } - export class MsgAssociateBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgAssociateBondResponse { - const message = new MsgAssociateBondResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAssociateBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgAssociateBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgAssociateBondResponse { - return MsgAssociateBondResponse.deserialize(bytes); - } - } - export class MsgDissociateBond extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - record_id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("record_id" in data && data.record_id != undefined) { - this.record_id = data.record_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get record_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set record_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - record_id?: string; - signer?: string; - }): MsgDissociateBond { - const message = new MsgDissociateBond({}); - if (data.record_id != null) { - message.record_id = data.record_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - record_id?: string; - signer?: string; - } = {}; - if (this.record_id != null) { - data.record_id = this.record_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.record_id.length) - writer.writeString(1, this.record_id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateBond { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDissociateBond(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.record_id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgDissociateBond { - return MsgDissociateBond.deserialize(bytes); - } - } - export class MsgDissociateBondResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgDissociateBondResponse { - const message = new MsgDissociateBondResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateBondResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDissociateBondResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgDissociateBondResponse { - return MsgDissociateBondResponse.deserialize(bytes); - } - } - export class MsgDissociateRecords extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - bond_id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("bond_id" in data && data.bond_id != undefined) { - this.bond_id = data.bond_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get bond_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set bond_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - bond_id?: string; - signer?: string; - }): MsgDissociateRecords { - const message = new MsgDissociateRecords({}); - if (data.bond_id != null) { - message.bond_id = data.bond_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - bond_id?: string; - signer?: string; - } = {}; - if (this.bond_id != null) { - data.bond_id = this.bond_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.bond_id.length) - writer.writeString(1, this.bond_id); - if (this.signer.length) - writer.writeString(2, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateRecords { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDissociateRecords(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.bond_id = reader.readString(); - break; - case 2: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgDissociateRecords { - return MsgDissociateRecords.deserialize(bytes); - } - } - export class MsgDissociateRecordsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgDissociateRecordsResponse { - const message = new MsgDissociateRecordsResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateRecordsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgDissociateRecordsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgDissociateRecordsResponse { - return MsgDissociateRecordsResponse.deserialize(bytes); - } - } - export class MsgReAssociateRecords extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - new_bond_id?: string; - old_bond_id?: string; - signer?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("new_bond_id" in data && data.new_bond_id != undefined) { - this.new_bond_id = data.new_bond_id; - } - if ("old_bond_id" in data && data.old_bond_id != undefined) { - this.old_bond_id = data.old_bond_id; - } - if ("signer" in data && data.signer != undefined) { - this.signer = data.signer; - } - } - } - get new_bond_id() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set new_bond_id(value: string) { - pb_1.Message.setField(this, 1, value); - } - get old_bond_id() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set old_bond_id(value: string) { - pb_1.Message.setField(this, 2, value); - } - get signer() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set signer(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - new_bond_id?: string; - old_bond_id?: string; - signer?: string; - }): MsgReAssociateRecords { - const message = new MsgReAssociateRecords({}); - if (data.new_bond_id != null) { - message.new_bond_id = data.new_bond_id; - } - if (data.old_bond_id != null) { - message.old_bond_id = data.old_bond_id; - } - if (data.signer != null) { - message.signer = data.signer; - } - return message; - } - toObject() { - const data: { - new_bond_id?: string; - old_bond_id?: string; - signer?: string; - } = {}; - if (this.new_bond_id != null) { - data.new_bond_id = this.new_bond_id; - } - if (this.old_bond_id != null) { - data.old_bond_id = this.old_bond_id; - } - if (this.signer != null) { - data.signer = this.signer; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.new_bond_id.length) - writer.writeString(1, this.new_bond_id); - if (this.old_bond_id.length) - writer.writeString(2, this.old_bond_id); - if (this.signer.length) - writer.writeString(3, this.signer); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReAssociateRecords { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgReAssociateRecords(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.new_bond_id = reader.readString(); - break; - case 2: - message.old_bond_id = reader.readString(); - break; - case 3: - message.signer = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgReAssociateRecords { - return MsgReAssociateRecords.deserialize(bytes); - } - } - export class MsgReAssociateRecordsResponse extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): MsgReAssociateRecordsResponse { - const message = new MsgReAssociateRecordsResponse({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReAssociateRecordsResponse { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgReAssociateRecordsResponse(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MsgReAssociateRecordsResponse { - return MsgReAssociateRecordsResponse.deserialize(bytes); - } - } -} -- 2.45.2 From 4237affad5284c3182940d6d09169c8e4ec9bd8a Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 12:45:49 +0530 Subject: [PATCH 2/7] Update protofiles and regenerate bindings --- proto/cerc/auction/module/v1/module.proto | 2 +- proto/cerc/auction/v1/auction.proto | 2 +- proto/cerc/auction/v1/genesis.proto | 2 +- proto/cerc/auction/v1/query.proto | 2 +- proto/cerc/auction/v1/tx.proto | 2 +- proto/cerc/bond/module/v1/module.proto | 2 +- proto/cerc/bond/v1/bond.proto | 2 +- proto/cerc/bond/v1/genesis.proto | 2 +- proto/cerc/bond/v1/query.proto | 2 +- proto/cerc/bond/v1/tx.proto | 2 +- proto/cerc/registry/module/v1/module.proto | 2 +- proto/cerc/registry/v1/genesis.proto | 2 +- proto/cerc/registry/v1/query.proto | 2 +- proto/cerc/registry/v1/registry.proto | 2 +- proto/cerc/registry/v1/tx.proto | 2 +- scripts/proto-gen.sh | 2 +- src/index.ts | 6 +++--- src/laconic-client.ts | 10 +++++----- src/{proto2 => proto}/amino/amino.ts | 0 src/{proto2 => proto}/cerc/auction/module/v1/module.ts | 0 src/{proto2 => proto}/cerc/auction/v1/auction.ts | 0 src/{proto2 => proto}/cerc/auction/v1/genesis.ts | 0 src/{proto2 => proto}/cerc/auction/v1/query.ts | 0 src/{proto2 => proto}/cerc/auction/v1/tx.ts | 0 src/{proto2 => proto}/cerc/bond/module/v1/module.ts | 0 src/{proto2 => proto}/cerc/bond/v1/bond.ts | 0 src/{proto2 => proto}/cerc/bond/v1/genesis.ts | 0 src/{proto2 => proto}/cerc/bond/v1/query.ts | 0 src/{proto2 => proto}/cerc/bond/v1/tx.ts | 0 .../cerc/registry/module/v1/module.ts | 0 src/{proto2 => proto}/cerc/registry/v1/genesis.ts | 0 src/{proto2 => proto}/cerc/registry/v1/query.ts | 0 src/{proto2 => proto}/cerc/registry/v1/registry.ts | 0 src/{proto2 => proto}/cerc/registry/v1/tx.ts | 0 src/{proto2 => proto}/cosmos/app/v1alpha1/module.ts | 0 src/{proto2 => proto}/cosmos/bank/v1beta1/bank.ts | 0 src/{proto2 => proto}/cosmos/bank/v1beta1/tx.ts | 0 .../cosmos/base/query/v1beta1/pagination.ts | 0 src/{proto2 => proto}/cosmos/base/v1beta1/coin.ts | 0 src/{proto2 => proto}/cosmos/msg/v1/msg.ts | 0 src/{proto2 => proto}/cosmos_proto/cosmos.ts | 0 src/{proto2 => proto}/gogoproto/gogo.ts | 0 src/{proto2 => proto}/google/api/annotations.ts | 0 src/{proto2 => proto}/google/api/http.ts | 0 src/{proto2 => proto}/google/protobuf/descriptor.ts | 0 src/{proto2 => proto}/google/protobuf/duration.ts | 0 src/{proto2 => proto}/google/protobuf/timestamp.ts | 0 src/types/cerc/auction/message.ts | 2 +- src/types/cerc/bond/message.ts | 2 +- src/types/cerc/registry/message.ts | 2 +- src/types/cosmos/bank/message.ts | 2 +- 51 files changed, 28 insertions(+), 28 deletions(-) rename src/{proto2 => proto}/amino/amino.ts (100%) rename src/{proto2 => proto}/cerc/auction/module/v1/module.ts (100%) rename src/{proto2 => proto}/cerc/auction/v1/auction.ts (100%) rename src/{proto2 => proto}/cerc/auction/v1/genesis.ts (100%) rename src/{proto2 => proto}/cerc/auction/v1/query.ts (100%) rename src/{proto2 => proto}/cerc/auction/v1/tx.ts (100%) rename src/{proto2 => proto}/cerc/bond/module/v1/module.ts (100%) rename src/{proto2 => proto}/cerc/bond/v1/bond.ts (100%) rename src/{proto2 => proto}/cerc/bond/v1/genesis.ts (100%) rename src/{proto2 => proto}/cerc/bond/v1/query.ts (100%) rename src/{proto2 => proto}/cerc/bond/v1/tx.ts (100%) rename src/{proto2 => proto}/cerc/registry/module/v1/module.ts (100%) rename src/{proto2 => proto}/cerc/registry/v1/genesis.ts (100%) rename src/{proto2 => proto}/cerc/registry/v1/query.ts (100%) rename src/{proto2 => proto}/cerc/registry/v1/registry.ts (100%) rename src/{proto2 => proto}/cerc/registry/v1/tx.ts (100%) rename src/{proto2 => proto}/cosmos/app/v1alpha1/module.ts (100%) rename src/{proto2 => proto}/cosmos/bank/v1beta1/bank.ts (100%) rename src/{proto2 => proto}/cosmos/bank/v1beta1/tx.ts (100%) rename src/{proto2 => proto}/cosmos/base/query/v1beta1/pagination.ts (100%) rename src/{proto2 => proto}/cosmos/base/v1beta1/coin.ts (100%) rename src/{proto2 => proto}/cosmos/msg/v1/msg.ts (100%) rename src/{proto2 => proto}/cosmos_proto/cosmos.ts (100%) rename src/{proto2 => proto}/gogoproto/gogo.ts (100%) rename src/{proto2 => proto}/google/api/annotations.ts (100%) rename src/{proto2 => proto}/google/api/http.ts (100%) rename src/{proto2 => proto}/google/protobuf/descriptor.ts (100%) rename src/{proto2 => proto}/google/protobuf/duration.ts (100%) rename src/{proto2 => proto}/google/protobuf/timestamp.ts (100%) diff --git a/proto/cerc/auction/module/v1/module.proto b/proto/cerc/auction/module/v1/module.proto index 3a7b2f6..287edff 100644 --- a/proto/cerc/auction/module/v1/module.proto +++ b/proto/cerc/auction/module/v1/module.proto @@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import : "git.vdb.to/cerc-io/laconic2d/x/auction" + go_import : "git.vdb.to/cerc-io/laconicd/x/auction" }; } diff --git a/proto/cerc/auction/v1/auction.proto b/proto/cerc/auction/v1/auction.proto index 8e8cc55..f80c9d6 100644 --- a/proto/cerc/auction/v1/auction.proto +++ b/proto/cerc/auction/v1/auction.proto @@ -7,7 +7,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/auction"; // Params defines the auction module parameters message Params { diff --git a/proto/cerc/auction/v1/genesis.proto b/proto/cerc/auction/v1/genesis.proto index 667a49a..2e2af1a 100644 --- a/proto/cerc/auction/v1/genesis.proto +++ b/proto/cerc/auction/v1/genesis.proto @@ -5,7 +5,7 @@ package cerc.auction.v1; import "gogoproto/gogo.proto"; import "cerc/auction/v1/auction.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/auction"; // GenesisState defines the genesis state of the auction module message GenesisState { diff --git a/proto/cerc/auction/v1/query.proto b/proto/cerc/auction/v1/query.proto index d513f49..46e424a 100644 --- a/proto/cerc/auction/v1/query.proto +++ b/proto/cerc/auction/v1/query.proto @@ -8,7 +8,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cerc/auction/v1/auction.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/auction"; // Query defines the gRPC querier interface for the auction module service Query { diff --git a/proto/cerc/auction/v1/tx.proto b/proto/cerc/auction/v1/tx.proto index f200026..b4b1795 100644 --- a/proto/cerc/auction/v1/tx.proto +++ b/proto/cerc/auction/v1/tx.proto @@ -9,7 +9,7 @@ import "google/protobuf/duration.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cerc/auction/v1/auction.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/auction"; // Tx defines the gRPC tx interface service Msg { diff --git a/proto/cerc/bond/module/v1/module.proto b/proto/cerc/bond/module/v1/module.proto index fb868aa..ea52203 100644 --- a/proto/cerc/bond/module/v1/module.proto +++ b/proto/cerc/bond/module/v1/module.proto @@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import : "git.vdb.to/cerc-io/laconic2d/x/bond" + go_import : "git.vdb.to/cerc-io/laconicd/x/bond" }; } diff --git a/proto/cerc/bond/v1/bond.proto b/proto/cerc/bond/v1/bond.proto index c8351ae..c6f5dfe 100644 --- a/proto/cerc/bond/v1/bond.proto +++ b/proto/cerc/bond/v1/bond.proto @@ -5,7 +5,7 @@ package cerc.bond.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/bond"; // Params defines the parameters of the bond module. message Params { diff --git a/proto/cerc/bond/v1/genesis.proto b/proto/cerc/bond/v1/genesis.proto index a40e52b..f599beb 100644 --- a/proto/cerc/bond/v1/genesis.proto +++ b/proto/cerc/bond/v1/genesis.proto @@ -5,7 +5,7 @@ package cerc.bond.v1; import "gogoproto/gogo.proto"; import "cerc/bond/v1/bond.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/bond"; // GenesisState defines the bond module's genesis state. message GenesisState { diff --git a/proto/cerc/bond/v1/query.proto b/proto/cerc/bond/v1/query.proto index 9814f8c..5923b77 100644 --- a/proto/cerc/bond/v1/query.proto +++ b/proto/cerc/bond/v1/query.proto @@ -9,7 +9,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cerc/bond/v1/bond.proto"; // import "cosmos/query/v1/query.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/bond"; // Query defines the gRPC querier service for bond module service Query { diff --git a/proto/cerc/bond/v1/tx.proto b/proto/cerc/bond/v1/tx.proto index 43e0071..1812b10 100644 --- a/proto/cerc/bond/v1/tx.proto +++ b/proto/cerc/bond/v1/tx.proto @@ -7,7 +7,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/bond"; // Msg defines the bond Msg service. service Msg { diff --git a/proto/cerc/registry/module/v1/module.proto b/proto/cerc/registry/module/v1/module.proto index b09e2fc..2140d6a 100644 --- a/proto/cerc/registry/module/v1/module.proto +++ b/proto/cerc/registry/module/v1/module.proto @@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import : "git.vdb.to/cerc-io/laconic2d/x/registry" + go_import : "git.vdb.to/cerc-io/laconicd/x/registry" }; } diff --git a/proto/cerc/registry/v1/genesis.proto b/proto/cerc/registry/v1/genesis.proto index 90b5dd2..90a4d68 100644 --- a/proto/cerc/registry/v1/genesis.proto +++ b/proto/cerc/registry/v1/genesis.proto @@ -5,7 +5,7 @@ package cerc.registry.v1; import "gogoproto/gogo.proto"; import "cerc/registry/v1/registry.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/registry"; // GenesisState defines the registry module's genesis state. message GenesisState { diff --git a/proto/cerc/registry/v1/query.proto b/proto/cerc/registry/v1/query.proto index 4572f48..3bc1909 100644 --- a/proto/cerc/registry/v1/query.proto +++ b/proto/cerc/registry/v1/query.proto @@ -8,7 +8,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cerc/registry/v1/registry.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/registry"; // Query defines the gRPC querier service for registry module service Query { diff --git a/proto/cerc/registry/v1/registry.proto b/proto/cerc/registry/v1/registry.proto index c32e476..35cf899 100644 --- a/proto/cerc/registry/v1/registry.proto +++ b/proto/cerc/registry/v1/registry.proto @@ -7,7 +7,7 @@ import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/registry"; // Params defines the registry module parameters message Params { diff --git a/proto/cerc/registry/v1/tx.proto b/proto/cerc/registry/v1/tx.proto index 36ecc70..b38c50f 100644 --- a/proto/cerc/registry/v1/tx.proto +++ b/proto/cerc/registry/v1/tx.proto @@ -7,7 +7,7 @@ import "gogoproto/gogo.proto"; import "cosmos/msg/v1/msg.proto"; import "cerc/registry/v1/registry.proto"; -option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; +option go_package = "git.vdb.to/cerc-io/laconicd/x/registry"; // Msg is a service which exposes the registry functionality service Msg { diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index 4c5d11c..38ba89d 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -5,7 +5,7 @@ set -e REPO_ROOT=$(pwd) I=$REPO_ROOT/proto -DEST_TS=$REPO_ROOT/src/proto2/ +DEST_TS=$REPO_ROOT/src/proto/ echo "Generating protobuf files" diff --git a/src/index.ts b/src/index.ts index 3cc0e37..73d8da0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,9 +25,9 @@ import { MessageMsgRevealBid } from './types/cerc/auction/message'; import { LaconicClient } from './laconic-client'; -import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto2/cerc/bond/v1/tx'; -import { Coin } from './proto2/cosmos/base/v1beta1/coin'; -import { MsgSendResponse } from './proto2/cosmos/bank/v1beta1/tx'; +import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto/cerc/bond/v1/tx'; +import { Coin } from './proto/cosmos/base/v1beta1/coin'; +import { MsgSendResponse } from './proto/cosmos/bank/v1beta1/tx'; import { MessageMsgSendCoins } from './types/cosmos/bank/message'; export const DEFAULT_CHAIN_ID = 'laconic_9000-1'; diff --git a/src/laconic-client.ts b/src/laconic-client.ts index fafcca8..f8b65a3 100644 --- a/src/laconic-client.ts +++ b/src/laconic-client.ts @@ -10,15 +10,15 @@ import { import { Comet38Client } from '@cosmjs/tendermint-rpc'; import { MsgCancelBondEncodeObject, MsgCreateBondEncodeObject, MsgRefillBondEncodeObject, MsgWithdrawBondEncodeObject, bondTypes, typeUrlMsgCancelBond, typeUrlMsgCreateBond, typeUrlMsgRefillBond, typeUrlMsgWithdrawBond } from './types/cerc/bond/message'; -import { Coin } from './proto2/cosmos/base/v1beta1/coin'; +import { Coin } from './proto/cosmos/base/v1beta1/coin'; import { MsgAssociateBondEncodeObject, MsgDeleteNameEncodeObject, MsgDissociateBondEncodeObject, MsgDissociateRecordsEncodeObject, MsgReassociateRecordsEncodeObject, MsgReserveAuthorityEncodeObject, MsgSetAuthorityBondEncodeObject, MsgSetNameEncodeObject, MsgSetRecordEncodeObject, registryTypes, typeUrlMsgAssociateBond, typeUrlMsgDeleteName, typeUrlMsgDissociateBond, typeUrlMsgDissociateRecords, typeUrlMsgReassociateRecords, typeUrlMsgReserveAuthority, typeUrlMsgSetAuthorityBond, typeUrlMsgSetName, typeUrlMsgSetRecord, NAMESERVICE_ERRORS } from './types/cerc/registry/message'; import { MsgCommitBidEncodeObject, MsgRevealBidEncodeObject, auctionTypes, typeUrlMsgCommitBid, typeUrlMsgRevealBid } from './types/cerc/auction/message'; -import { MsgAssociateBondResponse, MsgDeleteNameResponse, MsgDissociateBondResponse, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse, MsgReserveAuthorityResponse, MsgSetAuthorityBondResponse, MsgSetNameResponse, MsgSetRecordResponse, Payload } from './proto2/cerc/registry/v1/tx'; -import { Record, Signature } from './proto2/cerc/registry/v1/registry'; +import { MsgAssociateBondResponse, MsgDeleteNameResponse, MsgDissociateBondResponse, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse, MsgReserveAuthorityResponse, MsgSetAuthorityBondResponse, MsgSetNameResponse, MsgSetRecordResponse, Payload } from './proto/cerc/registry/v1/tx'; +import { Record, Signature } from './proto/cerc/registry/v1/registry'; import { Account } from './account'; import { Util } from './util'; -import { MsgCommitBidResponse, MsgRevealBidResponse } from './proto2/cerc/auction/v1/tx'; -import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto2/cerc/bond/v1/tx'; +import { MsgCommitBidResponse, MsgRevealBidResponse } from './proto/cerc/auction/v1/tx'; +import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto/cerc/bond/v1/tx'; import { bankTypes } from './types/cosmos/bank/message'; const DEFAULT_WRITE_ERROR = 'Unable to write to laconic2d.'; diff --git a/src/proto2/amino/amino.ts b/src/proto/amino/amino.ts similarity index 100% rename from src/proto2/amino/amino.ts rename to src/proto/amino/amino.ts diff --git a/src/proto2/cerc/auction/module/v1/module.ts b/src/proto/cerc/auction/module/v1/module.ts similarity index 100% rename from src/proto2/cerc/auction/module/v1/module.ts rename to src/proto/cerc/auction/module/v1/module.ts diff --git a/src/proto2/cerc/auction/v1/auction.ts b/src/proto/cerc/auction/v1/auction.ts similarity index 100% rename from src/proto2/cerc/auction/v1/auction.ts rename to src/proto/cerc/auction/v1/auction.ts diff --git a/src/proto2/cerc/auction/v1/genesis.ts b/src/proto/cerc/auction/v1/genesis.ts similarity index 100% rename from src/proto2/cerc/auction/v1/genesis.ts rename to src/proto/cerc/auction/v1/genesis.ts diff --git a/src/proto2/cerc/auction/v1/query.ts b/src/proto/cerc/auction/v1/query.ts similarity index 100% rename from src/proto2/cerc/auction/v1/query.ts rename to src/proto/cerc/auction/v1/query.ts diff --git a/src/proto2/cerc/auction/v1/tx.ts b/src/proto/cerc/auction/v1/tx.ts similarity index 100% rename from src/proto2/cerc/auction/v1/tx.ts rename to src/proto/cerc/auction/v1/tx.ts diff --git a/src/proto2/cerc/bond/module/v1/module.ts b/src/proto/cerc/bond/module/v1/module.ts similarity index 100% rename from src/proto2/cerc/bond/module/v1/module.ts rename to src/proto/cerc/bond/module/v1/module.ts diff --git a/src/proto2/cerc/bond/v1/bond.ts b/src/proto/cerc/bond/v1/bond.ts similarity index 100% rename from src/proto2/cerc/bond/v1/bond.ts rename to src/proto/cerc/bond/v1/bond.ts diff --git a/src/proto2/cerc/bond/v1/genesis.ts b/src/proto/cerc/bond/v1/genesis.ts similarity index 100% rename from src/proto2/cerc/bond/v1/genesis.ts rename to src/proto/cerc/bond/v1/genesis.ts diff --git a/src/proto2/cerc/bond/v1/query.ts b/src/proto/cerc/bond/v1/query.ts similarity index 100% rename from src/proto2/cerc/bond/v1/query.ts rename to src/proto/cerc/bond/v1/query.ts diff --git a/src/proto2/cerc/bond/v1/tx.ts b/src/proto/cerc/bond/v1/tx.ts similarity index 100% rename from src/proto2/cerc/bond/v1/tx.ts rename to src/proto/cerc/bond/v1/tx.ts diff --git a/src/proto2/cerc/registry/module/v1/module.ts b/src/proto/cerc/registry/module/v1/module.ts similarity index 100% rename from src/proto2/cerc/registry/module/v1/module.ts rename to src/proto/cerc/registry/module/v1/module.ts diff --git a/src/proto2/cerc/registry/v1/genesis.ts b/src/proto/cerc/registry/v1/genesis.ts similarity index 100% rename from src/proto2/cerc/registry/v1/genesis.ts rename to src/proto/cerc/registry/v1/genesis.ts diff --git a/src/proto2/cerc/registry/v1/query.ts b/src/proto/cerc/registry/v1/query.ts similarity index 100% rename from src/proto2/cerc/registry/v1/query.ts rename to src/proto/cerc/registry/v1/query.ts diff --git a/src/proto2/cerc/registry/v1/registry.ts b/src/proto/cerc/registry/v1/registry.ts similarity index 100% rename from src/proto2/cerc/registry/v1/registry.ts rename to src/proto/cerc/registry/v1/registry.ts diff --git a/src/proto2/cerc/registry/v1/tx.ts b/src/proto/cerc/registry/v1/tx.ts similarity index 100% rename from src/proto2/cerc/registry/v1/tx.ts rename to src/proto/cerc/registry/v1/tx.ts diff --git a/src/proto2/cosmos/app/v1alpha1/module.ts b/src/proto/cosmos/app/v1alpha1/module.ts similarity index 100% rename from src/proto2/cosmos/app/v1alpha1/module.ts rename to src/proto/cosmos/app/v1alpha1/module.ts diff --git a/src/proto2/cosmos/bank/v1beta1/bank.ts b/src/proto/cosmos/bank/v1beta1/bank.ts similarity index 100% rename from src/proto2/cosmos/bank/v1beta1/bank.ts rename to src/proto/cosmos/bank/v1beta1/bank.ts diff --git a/src/proto2/cosmos/bank/v1beta1/tx.ts b/src/proto/cosmos/bank/v1beta1/tx.ts similarity index 100% rename from src/proto2/cosmos/bank/v1beta1/tx.ts rename to src/proto/cosmos/bank/v1beta1/tx.ts diff --git a/src/proto2/cosmos/base/query/v1beta1/pagination.ts b/src/proto/cosmos/base/query/v1beta1/pagination.ts similarity index 100% rename from src/proto2/cosmos/base/query/v1beta1/pagination.ts rename to src/proto/cosmos/base/query/v1beta1/pagination.ts diff --git a/src/proto2/cosmos/base/v1beta1/coin.ts b/src/proto/cosmos/base/v1beta1/coin.ts similarity index 100% rename from src/proto2/cosmos/base/v1beta1/coin.ts rename to src/proto/cosmos/base/v1beta1/coin.ts diff --git a/src/proto2/cosmos/msg/v1/msg.ts b/src/proto/cosmos/msg/v1/msg.ts similarity index 100% rename from src/proto2/cosmos/msg/v1/msg.ts rename to src/proto/cosmos/msg/v1/msg.ts diff --git a/src/proto2/cosmos_proto/cosmos.ts b/src/proto/cosmos_proto/cosmos.ts similarity index 100% rename from src/proto2/cosmos_proto/cosmos.ts rename to src/proto/cosmos_proto/cosmos.ts diff --git a/src/proto2/gogoproto/gogo.ts b/src/proto/gogoproto/gogo.ts similarity index 100% rename from src/proto2/gogoproto/gogo.ts rename to src/proto/gogoproto/gogo.ts diff --git a/src/proto2/google/api/annotations.ts b/src/proto/google/api/annotations.ts similarity index 100% rename from src/proto2/google/api/annotations.ts rename to src/proto/google/api/annotations.ts diff --git a/src/proto2/google/api/http.ts b/src/proto/google/api/http.ts similarity index 100% rename from src/proto2/google/api/http.ts rename to src/proto/google/api/http.ts diff --git a/src/proto2/google/protobuf/descriptor.ts b/src/proto/google/protobuf/descriptor.ts similarity index 100% rename from src/proto2/google/protobuf/descriptor.ts rename to src/proto/google/protobuf/descriptor.ts diff --git a/src/proto2/google/protobuf/duration.ts b/src/proto/google/protobuf/duration.ts similarity index 100% rename from src/proto2/google/protobuf/duration.ts rename to src/proto/google/protobuf/duration.ts diff --git a/src/proto2/google/protobuf/timestamp.ts b/src/proto/google/protobuf/timestamp.ts similarity index 100% rename from src/proto2/google/protobuf/timestamp.ts rename to src/proto/google/protobuf/timestamp.ts diff --git a/src/types/cerc/auction/message.ts b/src/types/cerc/auction/message.ts index 80f3732..178798a 100644 --- a/src/types/cerc/auction/message.ts +++ b/src/types/cerc/auction/message.ts @@ -1,6 +1,6 @@ import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing'; -import { MsgCommitBidResponse, MsgCommitBid, MsgRevealBid, MsgRevealBidResponse } from '../../../proto2/cerc/auction/v1/tx'; +import { MsgCommitBidResponse, MsgCommitBid, MsgRevealBid, MsgRevealBidResponse } from '../../../proto/cerc/auction/v1/tx'; export const typeUrlMsgCommitBid = '/cerc.auction.v1.MsgCommitBid'; export const typeUrlMsgCommitBidResponse = '/cerc.auction.v1.MsgCommitBidResponse'; diff --git a/src/types/cerc/bond/message.ts b/src/types/cerc/bond/message.ts index 08d4439..139736c 100644 --- a/src/types/cerc/bond/message.ts +++ b/src/types/cerc/bond/message.ts @@ -9,7 +9,7 @@ import { MsgRefillBondResponse, MsgWithdrawBondResponse, MsgCancelBondResponse -} from '../../../proto2/cerc/bond/v1/tx'; +} from '../../../proto/cerc/bond/v1/tx'; export const typeUrlMsgCreateBond = '/cerc.bond.v1.MsgCreateBond'; export const typeUrlMsgRefillBond = '/cerc.bond.v1.MsgRefillBond'; diff --git a/src/types/cerc/registry/message.ts b/src/types/cerc/registry/message.ts index b048720..5ba88a0 100644 --- a/src/types/cerc/registry/message.ts +++ b/src/types/cerc/registry/message.ts @@ -1,6 +1,6 @@ import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing'; -import { MsgReserveAuthority, MsgReserveAuthorityResponse, MsgSetAuthorityBond, MsgSetAuthorityBondResponse, MsgSetRecord, MsgSetRecordResponse, MsgSetName, MsgSetNameResponse, MsgDeleteName, MsgDeleteNameResponse, MsgAssociateBond, MsgAssociateBondResponse, MsgDissociateBond, MsgDissociateBondResponse, MsgDissociateRecords, MsgReassociateRecords, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse } from '../../../proto2/cerc/registry/v1/tx'; +import { MsgReserveAuthority, MsgReserveAuthorityResponse, MsgSetAuthorityBond, MsgSetAuthorityBondResponse, MsgSetRecord, MsgSetRecordResponse, MsgSetName, MsgSetNameResponse, MsgDeleteName, MsgDeleteNameResponse, MsgAssociateBond, MsgAssociateBondResponse, MsgDissociateBond, MsgDissociateBondResponse, MsgDissociateRecords, MsgReassociateRecords, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse } from '../../../proto/cerc/registry/v1/tx'; export const typeUrlMsgReserveAuthority = '/cerc.registry.v1.MsgReserveAuthority'; export const typeUrlMsgSetRecord = '/cerc.registry.v1.MsgSetRecord'; diff --git a/src/types/cosmos/bank/message.ts b/src/types/cosmos/bank/message.ts index d012261..9b6ce39 100644 --- a/src/types/cosmos/bank/message.ts +++ b/src/types/cosmos/bank/message.ts @@ -2,7 +2,7 @@ import { GeneratedType } from '@cosmjs/proto-signing'; import { MsgSendResponse -} from '../../../proto2/cosmos/bank/v1beta1/tx'; +} from '../../../proto/cosmos/bank/v1beta1/tx'; export const typeUrlMsgSendResponse = '/cosmos.bank.v1beta1.MsgSendResponse'; -- 2.45.2 From 8378d36bf3b15cf204d108d3733b2f29271430c0 Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 13:51:15 +0530 Subject: [PATCH 3/7] Update readme and workflow --- .gitea/workflows/test.yml | 22 +++++++++++----------- README.md | 16 ++++++++-------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index f10d52b..0869835 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -16,10 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Checkout laconic2d + - name: Checkout laconicd uses: actions/checkout@v3 with: - path: "./laconic2d/" + path: "./laconicd/" repository: cerc-io/laconic2d fetch-depth: 0 ref: main @@ -31,33 +31,33 @@ jobs: dockerd -H $DOCKER_HOST --userland-proxy=false & sleep 5 - - name: Build laconic2d container - working-directory: laconic2d/tests/sdk_tests - run: ./build-laconic2d-container.sh + - name: Build laconicd container + working-directory: laconicd/tests/sdk_tests + run: ./build-laconicd-container.sh - name: Build sdk container run: ./scripts/build-sdk-test-container.sh - name: Start containers - working-directory: laconic2d/tests/sdk_tests + working-directory: laconicd/tests/sdk_tests run: docker compose up -d - name: Run tests - working-directory: laconic2d/tests/sdk_tests + working-directory: laconicd/tests/sdk_tests run: ./run-tests.sh - name: Start containers (auctions enabled) - working-directory: laconic2d/tests/sdk_tests + working-directory: laconicd/tests/sdk_tests env: TEST_AUCTION_ENABLED: true run: docker compose up -d - name: Run auction tests - working-directory: laconic2d/tests/sdk_tests + working-directory: laconicd/tests/sdk_tests run: ./run-tests.sh test:auctions - name: Start containers (expiry enabled) - working-directory: laconic2d/tests/sdk_tests + working-directory: laconicd/tests/sdk_tests env: TEST_REGISTRY_EXPIRY: true run: docker compose up -d - name: Run nameservice expiry tests - working-directory: laconic2d/tests/sdk_tests + working-directory: laconicd/tests/sdk_tests run: ./run-tests.sh test:nameservice-expiry diff --git a/README.md b/README.md index 08b9680..892129b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # registry-sdk -Client library used by TS/JS applications to communicate with laconic2d. +Client library used by TS/JS applications to communicate with laconicd. ## Tests @@ -18,14 +18,14 @@ Follow these steps to run the tests: cp .env.example .env ``` -- Clone the [laconic2d repo](https://git.vdb.to/cerc-io/laconic2d) and change to repo directory. +- Clone the [laconicd repo](https://git.vdb.to/cerc-io/laconic2d) and change to repo directory. - Run the chain using `./scripts/init.sh`. - Export the private key using: ```bash - laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe + laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe ``` - Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file. @@ -38,7 +38,7 @@ Follow these steps to run the tests: - Run the tests with auctions enabled - - In laconic2d repo run: + - In laconicd repo run: ```bash TEST_AUCTION_ENABLED=true ./scripts/init.sh clean @@ -47,7 +47,7 @@ Follow these steps to run the tests: - Export the private key and change it in `.env` file again using: ```bash - laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe + laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe ``` - Run tests: @@ -58,7 +58,7 @@ Follow these steps to run the tests: - Run the tests for record and authority expiry - - In laconic2d repo run: + - In laconicd repo run: ```bash TEST_REGISTRY_EXPIRY=true ./scripts/init.sh clean @@ -67,7 +67,7 @@ Follow these steps to run the tests: - Export the private key and change it in `.env` file again using: ```bash - laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe + laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe ``` - Run tests: @@ -87,7 +87,7 @@ Follow these steps to run the tests: failed to execute message; message index: 0: Invalid signature.: unauthorized ``` -- When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconic2d while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal). +- When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconicd while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal). - `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned. ``` -- 2.45.2 From 7be2908d30d5ee44175545f81f21c412d07ea682 Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 14:34:47 +0530 Subject: [PATCH 4/7] Rename laconicd rest endpoint to rpc endpoint --- .env.example | 2 +- .gitea/workflows/test.yml | 2 +- src/auction.test.ts | 4 ++-- src/bond.test.ts | 4 ++-- src/index.test.ts | 4 ++-- src/index.ts | 8 ++++---- src/nameservice-expiry.test.ts | 4 ++-- src/naming.test.ts | 4 ++-- src/registry-client.ts | 6 +++--- src/sdk.test.ts | 6 +++--- src/testing/helper.ts | 2 +- src/util.test.ts | 4 ++-- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.env.example b/.env.example index f14a8fc..a56bf4f 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ PRIVATE_KEY= COSMOS_CHAIN_ID=laconic_9000-1 LACONICD_GQL_ENDPOINT=http://localhost:9473/api -LACONICD_REST_ENDPOINT=http://127.0.0.1:26657 +LACONICD_RPC_ENDPOINT=http://127.0.0.1:26657 diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 0869835..e39c7ca 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v3 with: path: "./laconicd/" - repository: cerc-io/laconic2d + repository: cerc-io/laconic2d # TODO: Update to laconicd on repo renaming fetch-depth: 0 ref: main - name: Environment diff --git a/src/auction.test.ts b/src/auction.test.ts index a96af82..9e7c90a 100644 --- a/src/auction.test.ts +++ b/src/auction.test.ts @@ -3,7 +3,7 @@ import { getConfig } from './testing/helper'; import { DENOM } from './constants'; jest.setTimeout(30 * 60 * 1000); -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const auctionTests = (numBidders = 3) => { let registry: Registry; @@ -16,7 +16,7 @@ const auctionTests = (numBidders = 3) => { beforeAll(async () => { console.log('Running auction tests with num bidders', numBidders); - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); }); test('Setup bidder accounts', async () => { diff --git a/src/bond.test.ts b/src/bond.test.ts index 92124dc..ce4524c 100644 --- a/src/bond.test.ts +++ b/src/bond.test.ts @@ -7,7 +7,7 @@ import { DENOM } from './constants'; const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml'); const BOND_AMOUNT = '1000000000'; -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); jest.setTimeout(90 * 1000); @@ -21,7 +21,7 @@ const bondTests = () => { }; beforeAll(async () => { - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); }); test('Create bond.', async () => { diff --git a/src/index.test.ts b/src/index.test.ts index b68101e..0d846fc 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -3,7 +3,7 @@ import { DENOM } from './constants'; import { Registry } from './index'; import { getConfig } from './testing/helper'; -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); jest.setTimeout(90 * 1000); @@ -11,7 +11,7 @@ const registryTests = () => { let registry: Registry; beforeAll(async () => { - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); }); test('Get account info.', async () => { diff --git a/src/index.ts b/src/index.ts index 73d8da0..1bb4239 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,13 +63,13 @@ export class Registry { _chainID: string; _client: RegistryClient; - constructor (gqlUrl: string, restUrl = '', chainId: string = DEFAULT_CHAIN_ID) { + constructor (gqlUrl: string, rpcUrl = '', chainId: string = DEFAULT_CHAIN_ID) { this._endpoints = { - rest: restUrl, + rpc: rpcUrl, gql: gqlUrl }; - this._client = new RegistryClient(gqlUrl, restUrl); + this._client = new RegistryClient(gqlUrl, rpcUrl); this._chainID = chainId; } @@ -432,7 +432,7 @@ export class Registry { } async getLaconicClient (account: Account) { - return LaconicClient.connectWithSigner(this._endpoints.rest, account.wallet); + return LaconicClient.connectWithSigner(this._endpoints.rpc, account.wallet); } } diff --git a/src/nameservice-expiry.test.ts b/src/nameservice-expiry.test.ts index 7506eaa..c7ae38a 100644 --- a/src/nameservice-expiry.test.ts +++ b/src/nameservice-expiry.test.ts @@ -8,7 +8,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml'); jest.setTimeout(120 * 1000); -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const nameserviceExpiryTests = () => { let registry: Registry; @@ -21,7 +21,7 @@ const nameserviceExpiryTests = () => { let recordExpiryTime: Date; beforeAll(async () => { - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); // Create bond. bondId = await registry.getNextBondId(privateKey); diff --git a/src/naming.test.ts b/src/naming.test.ts index 098d2a7..973ad13 100644 --- a/src/naming.test.ts +++ b/src/naming.test.ts @@ -10,7 +10,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml'); jest.setTimeout(5 * 60 * 1000); -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const namingTests = () => { let registry: Registry; @@ -20,7 +20,7 @@ const namingTests = () => { let watcherId: string; beforeAll(async () => { - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); // Create bond. bondId = await registry.getNextBondId(privateKey); diff --git a/src/registry-client.ts b/src/registry-client.ts index ac1f48a..69d9ab5 100644 --- a/src/registry-client.ts +++ b/src/registry-client.ts @@ -95,7 +95,7 @@ const auctionFields = ` * Registry */ export class RegistryClient { - _restEndpoint: string; + _rpcEndpoint: string; _graph: any; /** @@ -128,14 +128,14 @@ export class RegistryClient { /** * New Client. */ - constructor (gqlEndpoint: string, restEndpoint: string) { + constructor (gqlEndpoint: string, rpcEndpoint: string) { assert(gqlEndpoint); this._graph = graphqlClient(gqlEndpoint, { method: 'POST', asJSON: true }); - this._restEndpoint = restEndpoint; + this._rpcEndpoint = rpcEndpoint; } /** diff --git a/src/sdk.test.ts b/src/sdk.test.ts index a69edaf..f3217f5 100644 --- a/src/sdk.test.ts +++ b/src/sdk.test.ts @@ -8,7 +8,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml'); jest.setTimeout(40 * 1000); -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); describe('Querying', () => { let watcher: any; @@ -16,7 +16,7 @@ describe('Querying', () => { let bondId: string; beforeAll(async () => { - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); bondId = await registry.getNextBondId(privateKey); await registry.createBond({ denom: DENOM, amount: '1000000000' }, privateKey, fee); @@ -31,7 +31,7 @@ describe('Querying', () => { }); test('Endpoint and chain ID.', async () => { - expect(registry.endpoints.rest).toBe(restEndpoint); + expect(registry.endpoints.rpc).toBe(rpcEndpoint); expect(registry.endpoints.gql).toBe(gqlEndpoint); expect(registry.chainID).toBe(chainId); }); diff --git a/src/testing/helper.ts b/src/testing/helper.ts index 8ca88bf..67695d4 100644 --- a/src/testing/helper.ts +++ b/src/testing/helper.ts @@ -25,7 +25,7 @@ export const getConfig = () => { return { chainId: process.env.COSMOS_CHAIN_ID || DEFAULT_CHAIN_ID, privateKey: process.env.PRIVATE_KEY, - restEndpoint: process.env.LACONICD_REST_ENDPOINT || 'http://localhost:26657', + rpcEndpoint: process.env.LACONICD_RPC_ENDPOINT || 'http://localhost:26657', gqlEndpoint: process.env.LACONICD_GQL_ENDPOINT || 'http://localhost:9473/api', fee: { amount: [{ denom: 'photon', amount: '40' }], diff --git a/src/util.test.ts b/src/util.test.ts index 1b0ac12..4e198a9 100644 --- a/src/util.test.ts +++ b/src/util.test.ts @@ -9,7 +9,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml'); jest.setTimeout(90 * 1000); -const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); +const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const utilTests = () => { let registry: Registry; @@ -19,7 +19,7 @@ const utilTests = () => { let watcherId: string; beforeAll(async () => { - registry = new Registry(gqlEndpoint, restEndpoint, chainId); + registry = new Registry(gqlEndpoint, rpcEndpoint, chainId); // Create bond. bondId = await registry.getNextBondId(privateKey); -- 2.45.2 From 6aa824ddbb51a1d6688ba5c6b1c923142bdcfe29 Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 16:17:31 +0530 Subject: [PATCH 5/7] Use test laconic2d branch in CI --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index e39c7ca..db4b17a 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -22,7 +22,7 @@ jobs: path: "./laconicd/" repository: cerc-io/laconic2d # TODO: Update to laconicd on repo renaming fetch-depth: 0 - ref: main + ref: nv-rename-rpc-endpoint - name: Environment run: ls -tlh && env -- 2.45.2 From 939500661190786126c6def47690d63dc8eab40d Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 16:51:17 +0530 Subject: [PATCH 6/7] Revert "Use test laconic2d branch in CI" This reverts commit 6aa824ddbb51a1d6688ba5c6b1c923142bdcfe29. --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index db4b17a..e39c7ca 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -22,7 +22,7 @@ jobs: path: "./laconicd/" repository: cerc-io/laconic2d # TODO: Update to laconicd on repo renaming fetch-depth: 0 - ref: nv-rename-rpc-endpoint + ref: main - name: Environment run: ls -tlh && env -- 2.45.2 From 05eb2498c459372dbd9248e5c98c506c60c13dae Mon Sep 17 00:00:00 2001 From: neeraj Date: Mon, 1 Apr 2024 16:57:35 +0530 Subject: [PATCH 7/7] Update package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d9a345..131a33a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/registry-sdk", - "version": "0.2.0", + "version": "0.2.1", "main": "dist/index.js", "types": "dist/index.d.ts", "repository": "git@github.com:cerc-io/registry-sdk.git", -- 2.45.2