Compare commits

..

17 Commits

Author SHA1 Message Date
Michael Shaw
26fa48e9d8 switch to main branch 2023-02-10 14:24:02 -05:00
Michael Shaw
df8d86a09c run auction and nameservice-expiry tests 2023-02-10 13:51:58 -05:00
Michael Shaw
f7658fc743 run against dev branch of laconicd 2023-02-10 12:00:11 -05:00
Michael Shaw
c6d358d3e4 diagnostic 2023-02-10 11:09:30 -05:00
Michael Shaw
fa2dabfda9 diagnostic 2023-02-10 10:46:44 -05:00
Michael Shaw
fa74a656bd working directory 2023-02-09 18:03:31 -05:00
Michael Shaw
d82f9cf44c script cleanup in action 2023-02-09 17:23:44 -05:00
Michael Shaw
20369a5d14 start both containers, not just laconicd 2023-02-09 17:22:13 -05:00
Michael Shaw
4b2a1750cc docker compose exec got dropped 2023-02-09 17:20:48 -05:00
Michael Shaw
dd99db7ad5 missing jest 2023-02-09 17:04:55 -05:00
Michael Shaw
203cfe118b first pass building test container on sdk side... only basic tests this iteration 2023-02-09 16:33:53 -05:00
Michael Shaw
01d03bfe78 double bond in naming test 2023-02-09 14:47:57 -05:00
Michael Shaw
fc4738adcf move into dir rather than args 2023-02-03 16:04:00 -05:00
Michael Shaw
cee2e53d3d lint cleanup 2023-02-03 15:40:51 -05:00
Michael Shaw
31e1ccafcc first pass running tests from sdk side 2023-02-03 14:59:25 -05:00
Michael Shaw
fc61a32ea9 nameservice passes local tests 2023-02-02 12:18:31 -05:00
Michael Shaw
606586818c truncated testing until questions of intent answered 2023-02-01 12:02:24 -05:00
30 changed files with 49 additions and 2328 deletions

View File

@ -1,36 +0,0 @@
name: Publish npm package to gitea
on:
release:
types: [published]
jobs:
npm_publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download yarn
run: |
curl -fsSL -o /usr/local/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-1.22.21.js
chmod +x /usr/local/bin/yarn
- 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.CICD_PUBLISH_TOKEN }}"
- name: npm publish
run: |
npm publish

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

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:

View File

@ -1,6 +1,6 @@
{
"name": "@cerc-io/laconic-sdk",
"version": "0.1.13",
"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"
},

View File

@ -30,102 +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\""];
repeated string repository = 8 [(gogoproto.moretags) = "json:\"repository\" yaml:\"repository\""];
string repository_ref = 9 [(gogoproto.moretags) = "json:\"repositoryRef\" yaml:\"repositoryRef\""];
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 ApplicationArtifact {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
string description = 4 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""];
string version = 5 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string application = 6 [(gogoproto.moretags) = "json:\"application\" yaml:\"application\""];
string content_type = 7 [(gogoproto.moretags) = "json:\"contentType\" yaml:\"contentType\""];
string os = 8 [(gogoproto.moretags) = "json:\"os\" yaml:\"os\""];
string cpu = 9 [(gogoproto.moretags) = "json:\"cpu\" yaml:\"cpu\""];
repeated string uri = 10 [(gogoproto.moretags) = "json:\"uri\" yaml:\"uri\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message DnsRecord {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
string version = 3 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string resource_type = 4 [(gogoproto.moretags) = "json:\"resourceType\" yaml:\"resourceType\""];
string value = 5 [(gogoproto.moretags) = "json:\"value\" yaml:\"value\""];
string request = 6 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message ApplicationDeploymentRequest {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
string version = 3 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string application = 4 [(gogoproto.moretags) = "json:\"application\" yaml:\"application\""];
string dns = 5 [(gogoproto.moretags) = "json:\"dns\" yaml:\"dns\""];
string config = 6 [(gogoproto.moretags) = "json:\"config\" yaml:\"config\""];
string deployment = 7 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message ApplicationDeploymentRecord {
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 dns = 7 [(gogoproto.moretags) = "json:\"dns\" yaml:\"dns\""];
string request = 8 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message ApplicationDeploymentRemovalRequest {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string version = 2 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string deployment = 3 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
string request = 4 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
}
message ApplicationDeploymentRemovalRecord {
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string version = 2 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
string deployment = 3 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
string request = 4 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
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: 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);

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";

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";

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";

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";

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);

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);

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";

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";

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/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: 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";

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";

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";

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";

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";

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";

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";

File diff suppressed because it is too large Load Diff

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/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: 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";

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/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: 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";

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 = () => {

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
}
/**

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"