Add new record types ApplicationRecord, WebAppDeploymentRecord, GeneralRecord
All checks were successful
Tests / sdk_tests (pull_request) Successful in 21m28s

This commit is contained in:
Thomas E Lackey 2023-11-17 14:48:20 -06:00
parent 82d8626d0f
commit 06e6919f10
26 changed files with 881 additions and 39 deletions

View File

@ -14,7 +14,7 @@
"dotenv": "^16.0.0",
"google-protobuf": "^3.21.0",
"jest": "29.0.0",
"protoc-gen-ts": "^0.8.5",
"protoc-gen-ts": "^0.8.7",
"ts-jest": "^29.0.2",
"typescript": "^4.6.2"
},

View File

@ -30,4 +30,42 @@ message WebsiteRegistrationRecord {
string tls_cert_cid = 4 [(gogoproto.moretags) = "json:\"TLSCertCID\" yaml:\"TLSCertCID\""];
string type = 5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
}
message ApplicationRecord {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
string description = 3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
string version = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string homepage = 5 [(gogoproto.moretags) = "json:\"homepage\" yaml:\"homepage\""];
string license = 6 [(gogoproto.moretags) = "json:\"license\" yaml:\"license\""];
string author = 7 [(gogoproto.moretags) = "json:\"author\" yaml:\"author\""];
string repository = 8 [(gogoproto.moretags) = "json:\"repository\" yaml:\"repository\""];
string repository_tag = 9 [(gogoproto.moretags) = "json:\"repositoryTag\" yaml:\"repositoryTag\""];
string app_version = 10 [(gogoproto.moretags) = "json:\"appVersion\" yaml:\"appVersion\""];
string app_type = 11 [(gogoproto.moretags) = "json:\"appType\" yaml:\"appType\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message WebAppDeploymentRecord {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
string description = 3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
string version = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string application = 5 [(gogoproto.moretags) = "json:\"application\" yaml:\"application\""];
string url = 6 [(gogoproto.moretags) = "json:\"\" yaml:\"name\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message GeneralRecord {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
string description = 3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
string version = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string category = 5 [(gogoproto.moretags) = "json:\"category\" yaml:\"category\""];
string value = 6 [(gogoproto.moretags) = "json:\"value\" yaml:\"value\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";
@ -37,7 +37,7 @@ export namespace cosmos.base.query.v1beta1 {
}
}
get key() {
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array()) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array;
}
set key(value: Uint8Array) {
pb_1.Message.setField(this, 1, value);
@ -184,7 +184,7 @@ export namespace cosmos.base.query.v1beta1 {
}
}
get next_key() {
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array()) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array;
}
set next_key(value: Uint8Array) {
pb_1.Message.setField(this, 1, value);

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* compiler version: 4.25.1
* source: google/api/annotations.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./http";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* compiler version: 4.25.1
* source: google/protobuf/any.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../gogoproto/gogo";
@ -32,7 +32,7 @@ export namespace google.protobuf {
pb_1.Message.setField(this, 1, value);
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array()) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array;
}
set value(value: Uint8Array) {
pb_1.Message.setField(this, 2, value);

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";
@ -3604,7 +3604,7 @@ export namespace google.protobuf {
return pb_1.Message.getField(this, 6) != null;
}
get string_value() {
return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array()) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array;
}
set string_value(value: Uint8Array) {
pb_1.Message.setField(this, 7, value);

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* compiler version: 4.25.1
* source: vulcanize/registry/v1beta1/attributes.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
@ -534,4 +534,803 @@ export namespace vulcanize.registry.v1beta1 {
return WebsiteRegistrationRecord.deserialize(bytes);
}
}
export class ApplicationRecord extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
type?: string;
name?: string;
description?: string;
version?: string;
homepage?: string;
license?: string;
author?: string;
repository?: string;
repository_tag?: string;
app_version?: string;
app_type?: string;
meta?: string;
tags?: string[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [21], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("type" in data && data.type != undefined) {
this.type = data.type;
}
if ("name" in data && data.name != undefined) {
this.name = data.name;
}
if ("description" in data && data.description != undefined) {
this.description = data.description;
}
if ("version" in data && data.version != undefined) {
this.version = data.version;
}
if ("homepage" in data && data.homepage != undefined) {
this.homepage = data.homepage;
}
if ("license" in data && data.license != undefined) {
this.license = data.license;
}
if ("author" in data && data.author != undefined) {
this.author = data.author;
}
if ("repository" in data && data.repository != undefined) {
this.repository = data.repository;
}
if ("repository_tag" in data && data.repository_tag != undefined) {
this.repository_tag = data.repository_tag;
}
if ("app_version" in data && data.app_version != undefined) {
this.app_version = data.app_version;
}
if ("app_type" in data && data.app_type != undefined) {
this.app_type = data.app_type;
}
if ("meta" in data && data.meta != undefined) {
this.meta = data.meta;
}
if ("tags" in data && data.tags != undefined) {
this.tags = data.tags;
}
}
}
get type() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set type(value: string) {
pb_1.Message.setField(this, 1, value);
}
get name() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set name(value: string) {
pb_1.Message.setField(this, 2, value);
}
get description() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set description(value: string) {
pb_1.Message.setField(this, 3, value);
}
get version() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set version(value: string) {
pb_1.Message.setField(this, 4, value);
}
get homepage() {
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set homepage(value: string) {
pb_1.Message.setField(this, 5, value);
}
get license() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
}
set license(value: string) {
pb_1.Message.setField(this, 6, value);
}
get author() {
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
}
set author(value: string) {
pb_1.Message.setField(this, 7, value);
}
get repository() {
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
}
set repository(value: string) {
pb_1.Message.setField(this, 8, value);
}
get repository_tag() {
return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
}
set repository_tag(value: string) {
pb_1.Message.setField(this, 9, value);
}
get app_version() {
return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
}
set app_version(value: string) {
pb_1.Message.setField(this, 10, value);
}
get app_type() {
return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
}
set app_type(value: string) {
pb_1.Message.setField(this, 11, value);
}
get meta() {
return pb_1.Message.getFieldWithDefault(this, 20, "") as string;
}
set meta(value: string) {
pb_1.Message.setField(this, 20, value);
}
get tags() {
return pb_1.Message.getFieldWithDefault(this, 21, []) as string[];
}
set tags(value: string[]) {
pb_1.Message.setField(this, 21, value);
}
static fromObject(data: {
type?: string;
name?: string;
description?: string;
version?: string;
homepage?: string;
license?: string;
author?: string;
repository?: string;
repository_tag?: string;
app_version?: string;
app_type?: string;
meta?: string;
tags?: string[];
}): ApplicationRecord {
const message = new ApplicationRecord({});
if (data.type != null) {
message.type = data.type;
}
if (data.name != null) {
message.name = data.name;
}
if (data.description != null) {
message.description = data.description;
}
if (data.version != null) {
message.version = data.version;
}
if (data.homepage != null) {
message.homepage = data.homepage;
}
if (data.license != null) {
message.license = data.license;
}
if (data.author != null) {
message.author = data.author;
}
if (data.repository != null) {
message.repository = data.repository;
}
if (data.repository_tag != null) {
message.repository_tag = data.repository_tag;
}
if (data.app_version != null) {
message.app_version = data.app_version;
}
if (data.app_type != null) {
message.app_type = data.app_type;
}
if (data.meta != null) {
message.meta = data.meta;
}
if (data.tags != null) {
message.tags = data.tags;
}
return message;
}
toObject() {
const data: {
type?: string;
name?: string;
description?: string;
version?: string;
homepage?: string;
license?: string;
author?: string;
repository?: string;
repository_tag?: string;
app_version?: string;
app_type?: string;
meta?: string;
tags?: string[];
} = {};
if (this.type != null) {
data.type = this.type;
}
if (this.name != null) {
data.name = this.name;
}
if (this.description != null) {
data.description = this.description;
}
if (this.version != null) {
data.version = this.version;
}
if (this.homepage != null) {
data.homepage = this.homepage;
}
if (this.license != null) {
data.license = this.license;
}
if (this.author != null) {
data.author = this.author;
}
if (this.repository != null) {
data.repository = this.repository;
}
if (this.repository_tag != null) {
data.repository_tag = this.repository_tag;
}
if (this.app_version != null) {
data.app_version = this.app_version;
}
if (this.app_type != null) {
data.app_type = this.app_type;
}
if (this.meta != null) {
data.meta = this.meta;
}
if (this.tags != null) {
data.tags = this.tags;
}
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.type.length)
writer.writeString(1, this.type);
if (this.name.length)
writer.writeString(2, this.name);
if (this.description.length)
writer.writeString(3, this.description);
if (this.version.length)
writer.writeString(4, this.version);
if (this.homepage.length)
writer.writeString(5, this.homepage);
if (this.license.length)
writer.writeString(6, this.license);
if (this.author.length)
writer.writeString(7, this.author);
if (this.repository.length)
writer.writeString(8, this.repository);
if (this.repository_tag.length)
writer.writeString(9, this.repository_tag);
if (this.app_version.length)
writer.writeString(10, this.app_version);
if (this.app_type.length)
writer.writeString(11, this.app_type);
if (this.meta.length)
writer.writeString(20, this.meta);
if (this.tags.length)
writer.writeRepeatedString(21, this.tags);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ApplicationRecord {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ApplicationRecord();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.type = reader.readString();
break;
case 2:
message.name = reader.readString();
break;
case 3:
message.description = reader.readString();
break;
case 4:
message.version = reader.readString();
break;
case 5:
message.homepage = reader.readString();
break;
case 6:
message.license = reader.readString();
break;
case 7:
message.author = reader.readString();
break;
case 8:
message.repository = reader.readString();
break;
case 9:
message.repository_tag = reader.readString();
break;
case 10:
message.app_version = reader.readString();
break;
case 11:
message.app_type = reader.readString();
break;
case 20:
message.meta = reader.readString();
break;
case 21:
pb_1.Message.addToRepeatedField(message, 21, reader.readString());
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): ApplicationRecord {
return ApplicationRecord.deserialize(bytes);
}
}
export class WebAppDeploymentRecord extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
type?: string;
name?: string;
description?: string;
version?: string;
application?: string;
url?: string;
meta?: string;
tags?: string[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [21], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("type" in data && data.type != undefined) {
this.type = data.type;
}
if ("name" in data && data.name != undefined) {
this.name = data.name;
}
if ("description" in data && data.description != undefined) {
this.description = data.description;
}
if ("version" in data && data.version != undefined) {
this.version = data.version;
}
if ("application" in data && data.application != undefined) {
this.application = data.application;
}
if ("url" in data && data.url != undefined) {
this.url = data.url;
}
if ("meta" in data && data.meta != undefined) {
this.meta = data.meta;
}
if ("tags" in data && data.tags != undefined) {
this.tags = data.tags;
}
}
}
get type() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set type(value: string) {
pb_1.Message.setField(this, 1, value);
}
get name() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set name(value: string) {
pb_1.Message.setField(this, 2, value);
}
get description() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set description(value: string) {
pb_1.Message.setField(this, 3, value);
}
get version() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set version(value: string) {
pb_1.Message.setField(this, 4, value);
}
get application() {
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set application(value: string) {
pb_1.Message.setField(this, 5, value);
}
get url() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
}
set url(value: string) {
pb_1.Message.setField(this, 6, value);
}
get meta() {
return pb_1.Message.getFieldWithDefault(this, 20, "") as string;
}
set meta(value: string) {
pb_1.Message.setField(this, 20, value);
}
get tags() {
return pb_1.Message.getFieldWithDefault(this, 21, []) as string[];
}
set tags(value: string[]) {
pb_1.Message.setField(this, 21, value);
}
static fromObject(data: {
type?: string;
name?: string;
description?: string;
version?: string;
application?: string;
url?: string;
meta?: string;
tags?: string[];
}): WebAppDeploymentRecord {
const message = new WebAppDeploymentRecord({});
if (data.type != null) {
message.type = data.type;
}
if (data.name != null) {
message.name = data.name;
}
if (data.description != null) {
message.description = data.description;
}
if (data.version != null) {
message.version = data.version;
}
if (data.application != null) {
message.application = data.application;
}
if (data.url != null) {
message.url = data.url;
}
if (data.meta != null) {
message.meta = data.meta;
}
if (data.tags != null) {
message.tags = data.tags;
}
return message;
}
toObject() {
const data: {
type?: string;
name?: string;
description?: string;
version?: string;
application?: string;
url?: string;
meta?: string;
tags?: string[];
} = {};
if (this.type != null) {
data.type = this.type;
}
if (this.name != null) {
data.name = this.name;
}
if (this.description != null) {
data.description = this.description;
}
if (this.version != null) {
data.version = this.version;
}
if (this.application != null) {
data.application = this.application;
}
if (this.url != null) {
data.url = this.url;
}
if (this.meta != null) {
data.meta = this.meta;
}
if (this.tags != null) {
data.tags = this.tags;
}
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.type.length)
writer.writeString(1, this.type);
if (this.name.length)
writer.writeString(2, this.name);
if (this.description.length)
writer.writeString(3, this.description);
if (this.version.length)
writer.writeString(4, this.version);
if (this.application.length)
writer.writeString(5, this.application);
if (this.url.length)
writer.writeString(6, this.url);
if (this.meta.length)
writer.writeString(20, this.meta);
if (this.tags.length)
writer.writeRepeatedString(21, this.tags);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WebAppDeploymentRecord {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WebAppDeploymentRecord();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.type = reader.readString();
break;
case 2:
message.name = reader.readString();
break;
case 3:
message.description = reader.readString();
break;
case 4:
message.version = reader.readString();
break;
case 5:
message.application = reader.readString();
break;
case 6:
message.url = reader.readString();
break;
case 20:
message.meta = reader.readString();
break;
case 21:
pb_1.Message.addToRepeatedField(message, 21, reader.readString());
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): WebAppDeploymentRecord {
return WebAppDeploymentRecord.deserialize(bytes);
}
}
export class GeneralRecord extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
type?: string;
name?: string;
description?: string;
version?: string;
category?: string;
value?: string;
meta?: string;
tags?: string[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [21], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("type" in data && data.type != undefined) {
this.type = data.type;
}
if ("name" in data && data.name != undefined) {
this.name = data.name;
}
if ("description" in data && data.description != undefined) {
this.description = data.description;
}
if ("version" in data && data.version != undefined) {
this.version = data.version;
}
if ("category" in data && data.category != undefined) {
this.category = data.category;
}
if ("value" in data && data.value != undefined) {
this.value = data.value;
}
if ("meta" in data && data.meta != undefined) {
this.meta = data.meta;
}
if ("tags" in data && data.tags != undefined) {
this.tags = data.tags;
}
}
}
get type() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set type(value: string) {
pb_1.Message.setField(this, 1, value);
}
get name() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set name(value: string) {
pb_1.Message.setField(this, 2, value);
}
get description() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set description(value: string) {
pb_1.Message.setField(this, 3, value);
}
get version() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set version(value: string) {
pb_1.Message.setField(this, 4, value);
}
get category() {
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set category(value: string) {
pb_1.Message.setField(this, 5, value);
}
get value() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
}
set value(value: string) {
pb_1.Message.setField(this, 6, value);
}
get meta() {
return pb_1.Message.getFieldWithDefault(this, 20, "") as string;
}
set meta(value: string) {
pb_1.Message.setField(this, 20, value);
}
get tags() {
return pb_1.Message.getFieldWithDefault(this, 21, []) as string[];
}
set tags(value: string[]) {
pb_1.Message.setField(this, 21, value);
}
static fromObject(data: {
type?: string;
name?: string;
description?: string;
version?: string;
category?: string;
value?: string;
meta?: string;
tags?: string[];
}): GeneralRecord {
const message = new GeneralRecord({});
if (data.type != null) {
message.type = data.type;
}
if (data.name != null) {
message.name = data.name;
}
if (data.description != null) {
message.description = data.description;
}
if (data.version != null) {
message.version = data.version;
}
if (data.category != null) {
message.category = data.category;
}
if (data.value != null) {
message.value = data.value;
}
if (data.meta != null) {
message.meta = data.meta;
}
if (data.tags != null) {
message.tags = data.tags;
}
return message;
}
toObject() {
const data: {
type?: string;
name?: string;
description?: string;
version?: string;
category?: string;
value?: string;
meta?: string;
tags?: string[];
} = {};
if (this.type != null) {
data.type = this.type;
}
if (this.name != null) {
data.name = this.name;
}
if (this.description != null) {
data.description = this.description;
}
if (this.version != null) {
data.version = this.version;
}
if (this.category != null) {
data.category = this.category;
}
if (this.value != null) {
data.value = this.value;
}
if (this.meta != null) {
data.meta = this.meta;
}
if (this.tags != null) {
data.tags = this.tags;
}
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.type.length)
writer.writeString(1, this.type);
if (this.name.length)
writer.writeString(2, this.name);
if (this.description.length)
writer.writeString(3, this.description);
if (this.version.length)
writer.writeString(4, this.version);
if (this.category.length)
writer.writeString(5, this.category);
if (this.value.length)
writer.writeString(6, this.value);
if (this.meta.length)
writer.writeString(20, this.meta);
if (this.tags.length)
writer.writeRepeatedString(21, this.tags);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GeneralRecord {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GeneralRecord();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.type = reader.readString();
break;
case 2:
message.name = reader.readString();
break;
case 3:
message.description = reader.readString();
break;
case 4:
message.version = reader.readString();
break;
case 5:
message.category = reader.readString();
break;
case 6:
message.value = reader.readString();
break;
case 20:
message.meta = reader.readString();
break;
case 21:
pb_1.Message.addToRepeatedField(message, 21, reader.readString());
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): GeneralRecord {
return GeneralRecord.deserialize(bytes);
}
}
}

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 3.12.4
* 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";

View File

@ -29,17 +29,22 @@ export class Record {
}
get attributes() {
let a = new any.google.protobuf.Any();
var a = new any.google.protobuf.Any()
if (this._record.type) {
const namespace: any = attributes.vulcanize.registry.v1beta1;
if (!namespace[this._record.type]) {
throw new Error(`Class not found: ${this._record.type}`);
}
if (this._record.type=="WebsiteRegistrationRecord"){
var attr= new attributes.vulcanize.registry.v1beta1.WebsiteRegistrationRecord(this._record)
a= new any.google.protobuf.Any({
type_url: "/vulcanize.registry.v1beta1.WebsiteRegistrationRecord",
value: attr.serialize()
})
const value = namespace[this._record.type].fromObject(this._record);
a = new any.google.protobuf.Any({
type_url: `/vulcanize.registry.v1beta1.${this._record.type}`,
value: value.serialize(),
});
}
return a
return a;
}
/**

View File

@ -3086,10 +3086,10 @@ protobufjs@~6.11.2:
"@types/node" ">=13.7.0"
long "^4.0.0"
protoc-gen-ts@^0.8.5:
version "0.8.5"
resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.8.5.tgz#5c277ff90b6b38f52313b1b0ad69e6c825305b29"
integrity sha512-LHZ+w/+DqmdgnhPtShgqtPtdv+hJ9bAXEIqNU0kkY2bPcCVIEWz5seOv20FCw6gbKorriTGP8xgz2RsIcrRvVw==
protoc-gen-ts@^0.8.7:
version "0.8.7"
resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.8.7.tgz#63e4d9af2ad30b753acf6f739323d01fc9f80b52"
integrity sha512-jr4VJey2J9LVYCV7EVyVe53g1VMw28cCmYJhBe5e3YX5wiyiDwgxWxeDf9oTqAe4P1bN/YGAkW2jhlH8LohwiQ==
randombytes@^2.0.1, randombytes@^2.1.0:
version "2.1.0"