1434 lines
62 KiB
TypeScript
1434 lines
62 KiB
TypeScript
// @ts-nocheck
|
|
/* eslint-disable */
|
|
/**
|
|
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
* compiler version: 3.14.0
|
|
* source: vulcanize/nameservice/v1beta1/nameservice.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.nameservice.v1beta1 {
|
|
export class Params extends pb_1.Message {
|
|
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, [], []);
|
|
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 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 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 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 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 authority_auction_enabled() {
|
|
return pb_1.Message.getField(this, 6) 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 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 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 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 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);
|
|
}
|
|
static fromObject(data: {
|
|
record_rent?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
record_rent_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_rent?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
authority_rent_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_grace_period?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_auction_enabled?: boolean;
|
|
authority_auction_commits_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_auction_reveals_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_auction_commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
authority_auction_reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
authority_auction_minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
}) {
|
|
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<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
record_rent_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_rent?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
authority_rent_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_grace_period?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_auction_enabled?: boolean;
|
|
authority_auction_commits_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_auction_reveals_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
|
authority_auction_commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
authority_auction_reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
authority_auction_minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
|
} = {};
|
|
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.record_rent !== undefined)
|
|
writer.writeMessage(1, this.record_rent, () => this.record_rent.serialize(writer));
|
|
if (this.record_rent_duration !== undefined)
|
|
writer.writeMessage(2, this.record_rent_duration, () => this.record_rent_duration.serialize(writer));
|
|
if (this.authority_rent !== undefined)
|
|
writer.writeMessage(3, this.authority_rent, () => this.authority_rent.serialize(writer));
|
|
if (this.authority_rent_duration !== undefined)
|
|
writer.writeMessage(4, this.authority_rent_duration, () => this.authority_rent_duration.serialize(writer));
|
|
if (this.authority_grace_period !== undefined)
|
|
writer.writeMessage(5, this.authority_grace_period, () => this.authority_grace_period.serialize(writer));
|
|
if (this.authority_auction_enabled !== undefined)
|
|
writer.writeBool(6, this.authority_auction_enabled);
|
|
if (this.authority_auction_commits_duration !== undefined)
|
|
writer.writeMessage(7, this.authority_auction_commits_duration, () => this.authority_auction_commits_duration.serialize(writer));
|
|
if (this.authority_auction_reveals_duration !== undefined)
|
|
writer.writeMessage(8, this.authority_auction_reveals_duration, () => this.authority_auction_reveals_duration.serialize(writer));
|
|
if (this.authority_auction_commit_fee !== undefined)
|
|
writer.writeMessage(9, this.authority_auction_commit_fee, () => this.authority_auction_commit_fee.serialize(writer));
|
|
if (this.authority_auction_reveal_fee !== undefined)
|
|
writer.writeMessage(10, this.authority_auction_reveal_fee, () => this.authority_auction_reveal_fee.serialize(writer));
|
|
if (this.authority_auction_minimum_bid !== undefined)
|
|
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 {
|
|
constructor(data?: any[] | {
|
|
id?: string;
|
|
bond_id?: string;
|
|
create_time?: string;
|
|
expiry_time?: string;
|
|
deleted?: boolean;
|
|
owners?: string[];
|
|
attributes?: string;
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], []);
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
get id() {
|
|
return pb_1.Message.getField(this, 1) as string;
|
|
}
|
|
set id(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get bond_id() {
|
|
return pb_1.Message.getField(this, 2) as string;
|
|
}
|
|
set bond_id(value: string) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get create_time() {
|
|
return pb_1.Message.getField(this, 3) as string;
|
|
}
|
|
set create_time(value: string) {
|
|
pb_1.Message.setField(this, 3, value);
|
|
}
|
|
get expiry_time() {
|
|
return pb_1.Message.getField(this, 4) as string;
|
|
}
|
|
set expiry_time(value: string) {
|
|
pb_1.Message.setField(this, 4, value);
|
|
}
|
|
get deleted() {
|
|
return pb_1.Message.getField(this, 5) as boolean;
|
|
}
|
|
set deleted(value: boolean) {
|
|
pb_1.Message.setField(this, 5, value);
|
|
}
|
|
get owners() {
|
|
return pb_1.Message.getField(this, 6) as string[];
|
|
}
|
|
set owners(value: string[]) {
|
|
pb_1.Message.setField(this, 6, value);
|
|
}
|
|
get attributes() {
|
|
return pb_1.Message.getField(this, 7) as string;
|
|
}
|
|
set attributes(value: string) {
|
|
pb_1.Message.setField(this, 7, value);
|
|
}
|
|
static fromObject(data: {
|
|
id?: string;
|
|
bond_id?: string;
|
|
create_time?: string;
|
|
expiry_time?: string;
|
|
deleted?: boolean;
|
|
owners?: string[];
|
|
attributes?: string;
|
|
}) {
|
|
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;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
id?: string;
|
|
bond_id?: string;
|
|
create_time?: string;
|
|
expiry_time?: string;
|
|
deleted?: boolean;
|
|
owners?: string[];
|
|
attributes?: 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;
|
|
}
|
|
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 (typeof this.id === "string" && this.id.length)
|
|
writer.writeString(1, this.id);
|
|
if (typeof this.bond_id === "string" && this.bond_id.length)
|
|
writer.writeString(2, this.bond_id);
|
|
if (typeof this.create_time === "string" && this.create_time.length)
|
|
writer.writeString(3, this.create_time);
|
|
if (typeof this.expiry_time === "string" && this.expiry_time.length)
|
|
writer.writeString(4, this.expiry_time);
|
|
if (this.deleted !== undefined)
|
|
writer.writeBool(5, this.deleted);
|
|
if (this.owners !== undefined)
|
|
writer.writeRepeatedString(6, this.owners);
|
|
if (typeof this.attributes === "string" && this.attributes.length)
|
|
writer.writeString(7, this.attributes);
|
|
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.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 {
|
|
constructor(data?: any[] | {
|
|
name?: string;
|
|
entry?: NameAuthority;
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
|
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.getField(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);
|
|
}
|
|
static fromObject(data: {
|
|
name?: string;
|
|
entry?: ReturnType<typeof NameAuthority.prototype.toObject>;
|
|
}) {
|
|
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<typeof NameAuthority.prototype.toObject>;
|
|
} = {};
|
|
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 (typeof this.name === "string" && this.name.length)
|
|
writer.writeString(1, this.name);
|
|
if (this.entry !== undefined)
|
|
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 {
|
|
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, [], []);
|
|
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.getField(this, 1) as string;
|
|
}
|
|
set owner_public_key(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get owner_address() {
|
|
return pb_1.Message.getField(this, 2) as string;
|
|
}
|
|
set owner_address(value: string) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get height() {
|
|
return pb_1.Message.getField(this, 3) as number;
|
|
}
|
|
set height(value: number) {
|
|
pb_1.Message.setField(this, 3, value);
|
|
}
|
|
get status() {
|
|
return pb_1.Message.getField(this, 4) as string;
|
|
}
|
|
set status(value: string) {
|
|
pb_1.Message.setField(this, 4, value);
|
|
}
|
|
get auction_id() {
|
|
return pb_1.Message.getField(this, 5) as string;
|
|
}
|
|
set auction_id(value: string) {
|
|
pb_1.Message.setField(this, 5, value);
|
|
}
|
|
get bond_id() {
|
|
return pb_1.Message.getField(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);
|
|
}
|
|
static fromObject(data: {
|
|
owner_public_key?: string;
|
|
owner_address?: string;
|
|
height?: number;
|
|
status?: string;
|
|
auction_id?: string;
|
|
bond_id?: string;
|
|
expiry_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
}) {
|
|
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<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
} = {};
|
|
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 (typeof this.owner_public_key === "string" && this.owner_public_key.length)
|
|
writer.writeString(1, this.owner_public_key);
|
|
if (typeof this.owner_address === "string" && this.owner_address.length)
|
|
writer.writeString(2, this.owner_address);
|
|
if (this.height !== undefined)
|
|
writer.writeUint64(3, this.height);
|
|
if (typeof this.status === "string" && this.status.length)
|
|
writer.writeString(4, this.status);
|
|
if (typeof this.auction_id === "string" && this.auction_id.length)
|
|
writer.writeString(5, this.auction_id);
|
|
if (typeof this.bond_id === "string" && this.bond_id.length)
|
|
writer.writeString(6, this.bond_id);
|
|
if (this.expiry_time !== undefined)
|
|
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 {
|
|
constructor(data?: any[] | {
|
|
name?: string;
|
|
entry?: NameRecord;
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
|
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.getField(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);
|
|
}
|
|
static fromObject(data: {
|
|
name?: string;
|
|
entry?: ReturnType<typeof NameRecord.prototype.toObject>;
|
|
}) {
|
|
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<typeof NameRecord.prototype.toObject>;
|
|
} = {};
|
|
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 (typeof this.name === "string" && this.name.length)
|
|
writer.writeString(1, this.name);
|
|
if (this.entry !== undefined)
|
|
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 {
|
|
constructor(data?: any[] | {
|
|
latest?: NameRecordEntry;
|
|
history?: NameRecordEntry[];
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
|
|
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 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<typeof NameRecordEntry.prototype.toObject>;
|
|
history?: ReturnType<typeof NameRecordEntry.prototype.toObject>[];
|
|
}) {
|
|
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<typeof NameRecordEntry.prototype.toObject>;
|
|
history?: ReturnType<typeof NameRecordEntry.prototype.toObject>[];
|
|
} = {};
|
|
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.latest !== undefined)
|
|
writer.writeMessage(1, this.latest, () => this.latest.serialize(writer));
|
|
if (this.history !== undefined)
|
|
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 {
|
|
constructor(data?: any[] | {
|
|
id?: string;
|
|
height?: number;
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
|
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.getField(this, 1) as string;
|
|
}
|
|
set id(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get height() {
|
|
return pb_1.Message.getField(this, 2) as number;
|
|
}
|
|
set height(value: number) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
static fromObject(data: {
|
|
id?: string;
|
|
height?: number;
|
|
}) {
|
|
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 (typeof this.id === "string" && this.id.length)
|
|
writer.writeString(1, this.id);
|
|
if (this.height !== undefined)
|
|
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 {
|
|
constructor(data?: any[] | {
|
|
sig?: string;
|
|
pub_key?: string;
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
|
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.getField(this, 1) as string;
|
|
}
|
|
set sig(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get pub_key() {
|
|
return pb_1.Message.getField(this, 2) as string;
|
|
}
|
|
set pub_key(value: string) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
static fromObject(data: {
|
|
sig?: string;
|
|
pub_key?: string;
|
|
}) {
|
|
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 (typeof this.sig === "string" && this.sig.length)
|
|
writer.writeString(1, this.sig);
|
|
if (typeof this.pub_key === "string" && 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 {
|
|
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], []);
|
|
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.getField(this, 1) as number;
|
|
}
|
|
set height(value: number) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get records() {
|
|
return pb_1.Message.getField(this, 2) as string[];
|
|
}
|
|
set records(value: string[]) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get auctions() {
|
|
return pb_1.Message.getField(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.getField(this, 5) as string[];
|
|
}
|
|
set authorities(value: string[]) {
|
|
pb_1.Message.setField(this, 5, value);
|
|
}
|
|
get names() {
|
|
return pb_1.Message.getField(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<typeof AuctionBidInfo.prototype.toObject>[];
|
|
authorities?: string[];
|
|
names?: string[];
|
|
}) {
|
|
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<typeof AuctionBidInfo.prototype.toObject>[];
|
|
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 !== undefined)
|
|
writer.writeInt64(1, this.height);
|
|
if (this.records !== undefined)
|
|
writer.writeRepeatedString(2, this.records);
|
|
if (this.auctions !== undefined)
|
|
writer.writeRepeatedString(3, this.auctions);
|
|
if (this.auction_bids !== undefined)
|
|
writer.writeRepeatedMessage(4, this.auction_bids, (item: AuctionBidInfo) => item.serialize(writer));
|
|
if (this.authorities !== undefined)
|
|
writer.writeRepeatedString(5, this.authorities);
|
|
if (this.names !== undefined)
|
|
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 {
|
|
constructor(data?: any[] | {
|
|
auction_id?: string;
|
|
bidder_address?: string;
|
|
}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
|
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.getField(this, 1) as string;
|
|
}
|
|
set auction_id(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get bidder_address() {
|
|
return pb_1.Message.getField(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;
|
|
}) {
|
|
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 (typeof this.auction_id === "string" && this.auction_id.length)
|
|
writer.writeString(1, this.auction_id);
|
|
if (typeof this.bidder_address === "string" && 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);
|
|
}
|
|
}
|
|
}
|