Compare commits

..
Author SHA1 Message Date
Michael Shaw 852160de38 WIP for CICD from sdk side 2023-01-26 10:37:29 -05:00
38 changed files with 96 additions and 1222 deletions
-32
View File
@@ -1,32 +0,0 @@
name: Publish npm package to gitea
on:
release:
types: [published]
jobs:
npm_publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- name: Run yarn build
run: |
yarn build
- name: Configure git.vdb.to npm registry
run: |
npm config set registry https://git.vdb.to/api/packages/cerc-io/npm/
- name: Authenticate to git.vdb.to registry
run: |
npm config set -- '//git.vdb.to/api/packages/cerc-io/npm/:_authToken' "${{ secrets.GITEA_PUBLISH_TOKEN }}"
- name: npm publish
run: |
npm publish
-81
View File
@@ -1,81 +0,0 @@
name: Tests
on:
pull_request:
branches:
- '*'
push:
branches:
- main
- release/**
env:
DOCKER_HOST: unix:///var/run/dind.sock
jobs:
sdk_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout laconicd
uses: actions/checkout@v3
with:
path: "./laconicd/"
repository: cerc-io/laconicd
fetch-depth: 0
ref: main
- name: Environment
run: ls -tlh && env
- name: Start dockerd
run: |
dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5
- name: build containers scripts
working-directory: laconicd/tests/sdk_tests
run: ./build-laconicd-container.sh
- name: build test-container
run: docker build -t cerc-io/laconic-sdk-tester:local-test -f laconicd/tests/sdk_tests/Dockerfile-sdk .
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose up -d
- name: run basic tests
working-directory: laconicd/tests/sdk_tests
run: |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test"
- name: stop containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
- name: start auction containers
working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-auctions.yml up -d
- name: run auction tests
working-directory: laconicd/tests/sdk_tests
run: |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:auctions"
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-nameservice.yml up -d
- name: run nameservice expiry tests
working-directory: laconicd/tests/sdk_tests
run: |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:nameservice-expiry"
- name: stop nameservice containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
+35
View File
@@ -0,0 +1,35 @@
name: Docker Build
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
- run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_PACKAGES }}
- name: Docker Login
run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
- name: Docker Pull laconicd latest
run: docker pull git.vdb.to/cerc-io/laconicd/laconicd:latest
- name: Start laconicd container
- run: docker run git.vdb.to/cerc-io/laconicd/laconicd:latest
- name: Run tests
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_PACKAGES }}
run: |
yarn build
yarn test
- name: Stop laconicd container
- run: docker stop git.vdb.to/cerc-io/laconicd/laconicd:latest
-72
View File
@@ -1,72 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
sdk_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout laconicd
uses: actions/checkout@v3
with:
path: "./laconicd/"
repository: cerc-io/laconicd
fetch-depth: 0
ref: main
- name: Environment
run: ls -tlh && env
- name: build containers scripts
working-directory: laconicd/tests/sdk_tests
run: ./build-laconicd-container.sh
- name: build test-container
run: docker build -t cerc-io/laconic-sdk-tester:local-test -f laconicd/tests/sdk_tests/Dockerfile-sdk .
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose up -d
- name: run basic tests
working-directory: laconicd/tests/sdk_tests
run: |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test"
- name: stop containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
- name: start auction containers
working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-auctions.yml up -d
- name: run auction tests
working-directory: laconicd/tests/sdk_tests
run: |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:auctions"
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-nameservice.yml up -d
- name: run nameservice expiry tests
working-directory: laconicd/tests/sdk_tests
run: |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:nameservice-expiry"
- name: stop nameservice containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
+2 -1
View File
@@ -1,4 +1,5 @@
node_modules
dist
.env
.idea*
.env~
.idea
-54
View File
@@ -1,54 +0,0 @@
# Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
FROM node:${VARIANT}
ARG USERNAME=node
ARG NPM_GLOBAL=/usr/local/share/npm-global
# Add NPM global to PATH.
ENV PATH=${NPM_GLOBAL}/bin:${PATH}
RUN \
# Configure global npm install location, use group to adapt to UID/GID changes
if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \
&& usermod -a -G npm ${USERNAME} \
&& umask 0002 \
&& mkdir -p ${NPM_GLOBAL} \
&& touch /usr/local/etc/npmrc \
&& chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc \
&& chmod g+s ${NPM_GLOBAL} \
&& npm config -g set prefix ${NPM_GLOBAL} \
&& su ${USERNAME} -c "npm config -g set prefix ${NPM_GLOBAL}" \
# Install eslint
&& su ${USERNAME} -c "umask 0002 && npm install -g eslint lerna jest" \
&& npm cache clean --force > /dev/null 2>&1
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
WORKDIR /
RUN mkdir node_modules && mkdir proto && mkdir scripts && mkdir src
COPY node_modules ./node_modules/
COPY proto . ./proto/
COPY scripts ./scripts/
COPY src ./src/
COPY entrypoint.sh .
ENTRYPOINT ["/entrypoint.sh"]
# Placeholder CMD : generally this will be overridden at run time like :
# docker run -it -v /home/builder/cerc/laconic-sdk:/workspace cerc/builder-js sh -c 'cd /workspace && yarn && yarn build'
CMD node --version
# Temp hack, clone the laconic-sdk repo here
WORKDIR /app
RUN yarn install
WORKDIR /app/laconic-sdk
+1 -1
View File
@@ -57,7 +57,7 @@ Follow these steps to run the tests:
- In laconicd repo run:
```bash
TEST_REGISTRY_EXPIRY=true ./init.sh
TEST_NAMESERVICE_EXPIRY=true ./init.sh
```
- Export the private key and change it in `.env` file again using:
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
exec "$@"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/laconic-sdk",
"version": "0.1.7",
"version": "0.1.5",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "git@github.com:cerc-io/laconic-sdk.git",
@@ -14,7 +14,7 @@
"dotenv": "^16.0.0",
"google-protobuf": "^3.21.0",
"jest": "29.0.0",
"protoc-gen-ts": "^0.8.7",
"protoc-gen-ts": "^0.8.5",
"ts-jest": "^29.0.2",
"typescript": "^4.6.2"
},
@@ -30,45 +30,4 @@ 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 engines = 12 [(gogoproto.moretags) = "json:\"engines\" yaml:\"engines\""];
repeated string os = 13 [(gogoproto.moretags) = "json:\"os\" yaml:\"os\""];
repeated string cpu = 14 [(gogoproto.moretags) = "json:\"cpu\" yaml:\"cpu\""];
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:\"url\" yaml:\"url\""];
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\""];
}
+8 -9
View File
@@ -30,7 +30,7 @@ const nameserviceExpiryTests = () => {
test('Set record and check bond balance', async () => {
// Create watcher.
watcher = await ensureUpdatedConfig(WATCHER_YML_PATH);
const result = await registry.setRecord(
await registry.setRecord(
{
privateKey,
bondId,
@@ -39,8 +39,8 @@ const nameserviceExpiryTests = () => {
privateKey,
fee
)
console.log("SetRecordResult: " + result.data.id)
const [record] = await registry.queryRecords({ type: 'WebsiteRegistrationRecord', version: watcher.record.version }, true);
const [record] = await registry.queryRecords({ type: 'watcher', version: watcher.record.version }, true);
recordExpiryTime = new Date(record.expiryTime);
const [bond] = await registry.getBondsByIds([bondId]);
@@ -63,22 +63,21 @@ const nameserviceExpiryTests = () => {
});
test('Check record expiry time', async() => {
const [record] = await registry.queryRecords({ type: 'WebsiteRegistrationRecord', version: watcher.record.version }, true);
const updatedExpiryTime = new Date();
const [record] = await registry.queryRecords({ type: 'watcher', version: watcher.record.version }, true);
const updatedExpiryTime = new Date(record.expiryTime);
expect(updatedExpiryTime.getTime()).toBeGreaterThan(recordExpiryTime.getTime());
recordExpiryTime = updatedExpiryTime;
})
test('Check authority expiry time', async() => {
const [authority] = await registry.lookupAuthorities([authorityName]);
const updatedExpiryTime = new Date();
const updatedExpiryTime = new Date(authority.expiryTime);
expect(updatedExpiryTime.getTime()).toBeGreaterThan(authorityExpiryTime.getTime());
authorityExpiryTime = updatedExpiryTime;
})
test('Check bond balance', async () => {
const [bond] = await registry.getBondsByIds([bondId]);
console.log(bond)
expect(bond).toBeDefined();
expect(bond.balance).toHaveLength(0);
})
@@ -88,7 +87,7 @@ const nameserviceExpiryTests = () => {
});
test('Check record deleted without bond balance', async() => {
const records = await registry.queryRecords({ type: 'WebsiteRegistrationRecord', version: watcher.record.version }, true);
const records = await registry.queryRecords({ type: 'watcher', version: watcher.record.version }, true);
expect(records).toHaveLength(0);
})
@@ -105,7 +104,7 @@ if (!process.env.TEST_NAMESERVICE_EXPIRY) {
/**
Running these tests requires timers to be set. In laconicd repo run:
TEST_REGISTRY_EXPIRY=true ./init.sh
TEST_NAMESERVICE_EXPIRY=true ./init.sh
Run tests:
+2 -2
View File
@@ -7,7 +7,7 @@ import { ensureUpdatedConfig, getConfig } from './testing/helper';
const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml');
jest.setTimeout(120 * 1000);
jest.setTimeout(240 * 1000);
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
@@ -29,7 +29,7 @@ const namingTests = () => {
// Create bond.
bondId = await registry.getNextBondId(privateKey);
await registry.createBond({ denom: 'aphoton', amount: '2000000000' }, privateKey, fee);
await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
// Create watcher.
watcher = await ensureUpdatedConfig(WATCHER_YML_PATH);
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* 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(0)) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array()) 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(0)) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array()) as Uint8Array;
}
set next_key(value: Uint8Array) {
pb_1.Message.setField(this, 1, value);
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: cosmos/base/v1beta1/coin.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: gogoproto/gogo.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../google/protobuf/descriptor";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: google/api/annotations.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./http";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: google/api/http.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from "google-protobuf";
+2 -2
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* 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(0)) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array()) as Uint8Array;
}
set value(value: Uint8Array) {
pb_1.Message.setField(this, 2, value);
+2 -2
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* 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(0)) as Uint8Array;
return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array()) as Uint8Array;
}
set string_value(value: Uint8Array) {
pb_1.Message.setField(this, 7, value);
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: google/protobuf/duration.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from "google-protobuf";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: google/protobuf/timestamp.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from "google-protobuf";
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/auction/v1beta1/genesis.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/auction/v1beta1/query.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/auction/v1beta1/tx.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/auction/v1beta1/types.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/bond/v1beta1/bond.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/bond/v1beta1/genesis.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/bond/v1beta1/query.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/bond/v1beta1/tx.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/registry/v1beta1/attributes.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
@@ -534,872 +534,4 @@ 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;
engines?: string;
os?: string[];
cpu?: string[];
meta?: string;
tags?: string[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [13, 14, 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 ("engines" in data && data.engines != undefined) {
this.engines = data.engines;
}
if ("os" in data && data.os != undefined) {
this.os = data.os;
}
if ("cpu" in data && data.cpu != undefined) {
this.cpu = data.cpu;
}
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 engines() {
return pb_1.Message.getFieldWithDefault(this, 12, "") as string;
}
set engines(value: string) {
pb_1.Message.setField(this, 12, value);
}
get os() {
return pb_1.Message.getFieldWithDefault(this, 13, []) as string[];
}
set os(value: string[]) {
pb_1.Message.setField(this, 13, value);
}
get cpu() {
return pb_1.Message.getFieldWithDefault(this, 14, []) as string[];
}
set cpu(value: string[]) {
pb_1.Message.setField(this, 14, 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;
engines?: string;
os?: string[];
cpu?: 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.engines != null) {
message.engines = data.engines;
}
if (data.os != null) {
message.os = data.os;
}
if (data.cpu != null) {
message.cpu = data.cpu;
}
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;
engines?: string;
os?: string[];
cpu?: 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.engines != null) {
data.engines = this.engines;
}
if (this.os != null) {
data.os = this.os;
}
if (this.cpu != null) {
data.cpu = this.cpu;
}
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.engines.length)
writer.writeString(12, this.engines);
if (this.os.length)
writer.writeRepeatedString(13, this.os);
if (this.cpu.length)
writer.writeRepeatedString(14, this.cpu);
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 12:
message.engines = reader.readString();
break;
case 13:
pb_1.Message.addToRepeatedField(message, 13, reader.readString());
break;
case 14:
pb_1.Message.addToRepeatedField(message, 14, 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);
}
}
}
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/registry/v1beta1/genesis.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/registry/v1beta1/query.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./registry";
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/registry/v1beta1/registry.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../google/protobuf/duration";
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* compiler version: 3.12.4
* source: vulcanize/registry/v1beta1/tx.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
+1 -1
View File
@@ -4,4 +4,4 @@ record:
repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
version: 1.0.23
version: 1.0.24
+7 -12
View File
@@ -24,18 +24,13 @@ export const getBaseConfig = async (path: string) => {
* Provision a bond for record registration.
*/
export const provisionBondId = async (registry: Registry, privateKey: string, fee: Fee) => {
// let bonds = await registry.queryBonds();
// console.log("found bonds: " + bonds.length)
// if (!bonds.length) {
// await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
// bonds = await registry.queryBonds();
// console.log("created bond and got back: " + bonds.length)
// }
let bondId: string;
bondId = await registry.getNextBondId(privateKey);
await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
return bondId
//return bonds[0].id;
let bonds = await registry.queryBonds();
if (!bonds.length) {
await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
bonds = await registry.queryBonds();
}
return bonds[0].id;
};
export const getConfig = () => {
+8 -13
View File
@@ -29,22 +29,17 @@ export class Record {
}
get attributes() {
let 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}`);
}
var a = new any.google.protobuf.Any()
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(),
});
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()
})
}
return a;
return a
}
/**
+4 -4
View File
@@ -3086,10 +3086,10 @@ protobufjs@~6.11.2:
"@types/node" ">=13.7.0"
long "^4.0.0"
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==
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==
randombytes@^2.0.1, randombytes@^2.1.0:
version "2.1.0"