Rename laconic2d to laconicd (#10)

Part of https://www.notion.so/Rename-laconic2d-to-laconicd-9028d0c020d24d1288e92ebcb773d7a7

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Reviewed-on: cerc-io/registry-sdk#10
Co-authored-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
Co-committed-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
This commit is contained in:
Prathamesh Musale 2024-04-01 14:23:34 +00:00 committed by nabarun
parent 911be08850
commit ad07856267
84 changed files with 6131 additions and 21769 deletions

View File

@ -1,4 +1,4 @@
PRIVATE_KEY= PRIVATE_KEY=
COSMOS_CHAIN_ID=laconic_9000-1 COSMOS_CHAIN_ID=laconic_9000-1
LACONICD_GQL_ENDPOINT=http://localhost:9473/api LACONICD_GQL_ENDPOINT=http://localhost:9473/api
LACONICD_REST_ENDPOINT=http://127.0.0.1:26657 LACONICD_RPC_ENDPOINT=http://127.0.0.1:26657

View File

@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Checkout laconic2d - name: Checkout laconicd
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: "./laconic2d/" path: "./laconicd/"
repository: cerc-io/laconic2d repository: cerc-io/laconic2d # TODO: Update to laconicd on repo renaming
fetch-depth: 0 fetch-depth: 0
ref: main ref: main
- name: Environment - name: Environment
@ -31,33 +31,33 @@ jobs:
dockerd -H $DOCKER_HOST --userland-proxy=false & dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5 sleep 5
- name: Build laconic2d container - name: Build laconicd container
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./build-laconic2d-container.sh run: ./build-laconicd-container.sh
- name: Build sdk container - name: Build sdk container
run: ./scripts/build-sdk-test-container.sh run: ./scripts/build-sdk-test-container.sh
- name: Start containers - name: Start containers
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose up -d run: docker compose up -d
- name: Run tests - name: Run tests
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh run: ./run-tests.sh
- name: Start containers (auctions enabled) - name: Start containers (auctions enabled)
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
env: env:
TEST_AUCTION_ENABLED: true TEST_AUCTION_ENABLED: true
run: docker compose up -d run: docker compose up -d
- name: Run auction tests - name: Run auction tests
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh test:auctions run: ./run-tests.sh test:auctions
- name: Start containers (expiry enabled) - name: Start containers (expiry enabled)
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
env: env:
TEST_REGISTRY_EXPIRY: true TEST_REGISTRY_EXPIRY: true
run: docker compose up -d run: docker compose up -d
- name: Run nameservice expiry tests - name: Run nameservice expiry tests
working-directory: laconic2d/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh test:nameservice-expiry run: ./run-tests.sh test:nameservice-expiry

View File

@ -1,6 +1,6 @@
# registry-sdk # registry-sdk
Client library used by TS/JS applications to communicate with laconic2d. Client library used by TS/JS applications to communicate with laconicd.
## Tests ## Tests
@ -18,14 +18,14 @@ Follow these steps to run the tests:
cp .env.example .env cp .env.example .env
``` ```
- Clone the [laconic2d repo](https://git.vdb.to/cerc-io/laconic2d) and change to repo directory. - Clone the [laconicd repo](https://git.vdb.to/cerc-io/laconic2d) and change to repo directory.
- Run the chain using `./scripts/init.sh`. - Run the chain using `./scripts/init.sh`.
- Export the private key using: - Export the private key using:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
- Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file. - Copy the private key and assign it to variable `PRIVATE_KEY` in the `.env` file.
@ -38,7 +38,7 @@ Follow these steps to run the tests:
- Run the tests with auctions enabled - Run the tests with auctions enabled
- In laconic2d repo run: - In laconicd repo run:
```bash ```bash
TEST_AUCTION_ENABLED=true ./scripts/init.sh clean TEST_AUCTION_ENABLED=true ./scripts/init.sh clean
@ -47,7 +47,7 @@ Follow these steps to run the tests:
- Export the private key and change it in `.env` file again using: - Export the private key and change it in `.env` file again using:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
- Run tests: - Run tests:
@ -58,7 +58,7 @@ Follow these steps to run the tests:
- Run the tests for record and authority expiry - Run the tests for record and authority expiry
- In laconic2d repo run: - In laconicd repo run:
```bash ```bash
TEST_REGISTRY_EXPIRY=true ./scripts/init.sh clean TEST_REGISTRY_EXPIRY=true ./scripts/init.sh clean
@ -67,7 +67,7 @@ Follow these steps to run the tests:
- Export the private key and change it in `.env` file again using: - Export the private key and change it in `.env` file again using:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
- Run tests: - Run tests:
@ -87,7 +87,7 @@ Follow these steps to run the tests:
failed to execute message; message index: 0: Invalid signature.: unauthorized failed to execute message; message index: 0: Invalid signature.: unauthorized
``` ```
- When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconic2d while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal). - When sending `setRecord` message, an integer value passed in watcher attributes is parsed as float type in laconicd while [unmarshalling json](https://pkg.go.dev/encoding/json#Unmarshal).
- `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned. - `setRecord` message throws error when fileds in [Record](./src/types.ts) message are not assigned.
``` ```

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/registry-sdk", "name": "@cerc-io/registry-sdk",
"version": "0.2.0", "version": "0.2.1",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"repository": "git@github.com:cerc-io/registry-sdk.git", "repository": "git@github.com:cerc-io/registry-sdk.git",

View File

@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto";
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {
go_import : "git.vdb.to/cerc-io/laconic2d/x/auction" go_import : "git.vdb.to/cerc-io/laconicd/x/auction"
}; };
} }

View File

@ -7,7 +7,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
// Params defines the auction module parameters // Params defines the auction module parameters
message Params { message Params {

View File

@ -5,7 +5,7 @@ package cerc.auction.v1;
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cerc/auction/v1/auction.proto"; import "cerc/auction/v1/auction.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
// GenesisState defines the genesis state of the auction module // GenesisState defines the genesis state of the auction module
message GenesisState { message GenesisState {

View File

@ -8,7 +8,7 @@ import "cosmos/base/query/v1beta1/pagination.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
import "cerc/auction/v1/auction.proto"; import "cerc/auction/v1/auction.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
// Query defines the gRPC querier interface for the auction module // Query defines the gRPC querier interface for the auction module
service Query { service Query {

View File

@ -9,7 +9,7 @@ import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
import "cerc/auction/v1/auction.proto"; import "cerc/auction/v1/auction.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction"; option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
// Tx defines the gRPC tx interface // Tx defines the gRPC tx interface
service Msg { service Msg {

View File

@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto";
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {
go_import : "git.vdb.to/cerc-io/laconic2d/x/bond" go_import : "git.vdb.to/cerc-io/laconicd/x/bond"
}; };
} }

View File

@ -5,7 +5,7 @@ package cerc.bond.v1;
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
// Params defines the parameters of the bond module. // Params defines the parameters of the bond module.
message Params { message Params {

View File

@ -5,7 +5,7 @@ package cerc.bond.v1;
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cerc/bond/v1/bond.proto"; import "cerc/bond/v1/bond.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
// GenesisState defines the bond module's genesis state. // GenesisState defines the bond module's genesis state.
message GenesisState { message GenesisState {

View File

@ -9,7 +9,7 @@ import "cosmos/base/v1beta1/coin.proto";
import "cerc/bond/v1/bond.proto"; import "cerc/bond/v1/bond.proto";
// import "cosmos/query/v1/query.proto"; // import "cosmos/query/v1/query.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
// Query defines the gRPC querier service for bond module // Query defines the gRPC querier service for bond module
service Query { service Query {

View File

@ -7,7 +7,7 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond"; option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
// Msg defines the bond Msg service. // Msg defines the bond Msg service.
service Msg { service Msg {

View File

@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto";
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {
go_import : "git.vdb.to/cerc-io/laconic2d/x/registry" go_import : "git.vdb.to/cerc-io/laconicd/x/registry"
}; };
} }

View File

@ -5,7 +5,7 @@ package cerc.registry.v1;
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cerc/registry/v1/registry.proto"; import "cerc/registry/v1/registry.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
// GenesisState defines the registry module's genesis state. // GenesisState defines the registry module's genesis state.
message GenesisState { message GenesisState {

View File

@ -8,7 +8,7 @@ import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
import "cerc/registry/v1/registry.proto"; import "cerc/registry/v1/registry.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
// Query defines the gRPC querier service for registry module // Query defines the gRPC querier service for registry module
service Query { service Query {

View File

@ -7,7 +7,7 @@ import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
// Params defines the registry module parameters // Params defines the registry module parameters
message Params { message Params {

View File

@ -7,7 +7,7 @@ import "gogoproto/gogo.proto";
import "cosmos/msg/v1/msg.proto"; import "cosmos/msg/v1/msg.proto";
import "cerc/registry/v1/registry.proto"; import "cerc/registry/v1/registry.proto";
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry"; option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
// Msg is a service which exposes the registry functionality // Msg is a service which exposes the registry functionality
service Msg { service Msg {

View File

@ -5,7 +5,7 @@ set -e
REPO_ROOT=$(pwd) REPO_ROOT=$(pwd)
I=$REPO_ROOT/proto I=$REPO_ROOT/proto
DEST_TS=$REPO_ROOT/src/proto2/ DEST_TS=$REPO_ROOT/src/proto/
echo "Generating protobuf files" echo "Generating protobuf files"

View File

@ -3,7 +3,7 @@ import { getConfig } from './testing/helper';
import { DENOM } from './constants'; import { DENOM } from './constants';
jest.setTimeout(30 * 60 * 1000); jest.setTimeout(30 * 60 * 1000);
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
const auctionTests = (numBidders = 3) => { const auctionTests = (numBidders = 3) => {
let registry: Registry; let registry: Registry;
@ -16,7 +16,7 @@ const auctionTests = (numBidders = 3) => {
beforeAll(async () => { beforeAll(async () => {
console.log('Running auction tests with num bidders', numBidders); console.log('Running auction tests with num bidders', numBidders);
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
}); });
test('Setup bidder accounts', async () => { test('Setup bidder accounts', async () => {

View File

@ -7,7 +7,7 @@ import { DENOM } from './constants';
const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml'); const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml');
const BOND_AMOUNT = '1000000000'; const BOND_AMOUNT = '1000000000';
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
jest.setTimeout(90 * 1000); jest.setTimeout(90 * 1000);
@ -21,7 +21,7 @@ const bondTests = () => {
}; };
beforeAll(async () => { beforeAll(async () => {
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
}); });
test('Create bond.', async () => { test('Create bond.', async () => {

View File

@ -3,7 +3,7 @@ import { DENOM } from './constants';
import { Registry } from './index'; import { Registry } from './index';
import { getConfig } from './testing/helper'; import { getConfig } from './testing/helper';
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
jest.setTimeout(90 * 1000); jest.setTimeout(90 * 1000);
@ -11,7 +11,7 @@ const registryTests = () => {
let registry: Registry; let registry: Registry;
beforeAll(async () => { beforeAll(async () => {
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
}); });
test('Get account info.', async () => { test('Get account info.', async () => {

View File

@ -25,9 +25,9 @@ import {
MessageMsgRevealBid MessageMsgRevealBid
} from './types/cerc/auction/message'; } from './types/cerc/auction/message';
import { LaconicClient } from './laconic-client'; import { LaconicClient } from './laconic-client';
import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto2/cerc/bond/v1/tx'; import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto/cerc/bond/v1/tx';
import { Coin } from './proto2/cosmos/base/v1beta1/coin'; import { Coin } from './proto/cosmos/base/v1beta1/coin';
import { MsgSendResponse } from './proto2/cosmos/bank/v1beta1/tx'; import { MsgSendResponse } from './proto/cosmos/bank/v1beta1/tx';
import { MessageMsgSendCoins } from './types/cosmos/bank/message'; import { MessageMsgSendCoins } from './types/cosmos/bank/message';
export const DEFAULT_CHAIN_ID = 'laconic_9000-1'; export const DEFAULT_CHAIN_ID = 'laconic_9000-1';
@ -63,13 +63,13 @@ export class Registry {
_chainID: string; _chainID: string;
_client: RegistryClient; _client: RegistryClient;
constructor (gqlUrl: string, restUrl = '', chainId: string = DEFAULT_CHAIN_ID) { constructor (gqlUrl: string, rpcUrl = '', chainId: string = DEFAULT_CHAIN_ID) {
this._endpoints = { this._endpoints = {
rest: restUrl, rpc: rpcUrl,
gql: gqlUrl gql: gqlUrl
}; };
this._client = new RegistryClient(gqlUrl, restUrl); this._client = new RegistryClient(gqlUrl, rpcUrl);
this._chainID = chainId; this._chainID = chainId;
} }
@ -432,7 +432,7 @@ export class Registry {
} }
async getLaconicClient (account: Account) { async getLaconicClient (account: Account) {
return LaconicClient.connectWithSigner(this._endpoints.rest, account.wallet); return LaconicClient.connectWithSigner(this._endpoints.rpc, account.wallet);
} }
} }

View File

@ -10,15 +10,15 @@ import {
import { Comet38Client } from '@cosmjs/tendermint-rpc'; import { Comet38Client } from '@cosmjs/tendermint-rpc';
import { MsgCancelBondEncodeObject, MsgCreateBondEncodeObject, MsgRefillBondEncodeObject, MsgWithdrawBondEncodeObject, bondTypes, typeUrlMsgCancelBond, typeUrlMsgCreateBond, typeUrlMsgRefillBond, typeUrlMsgWithdrawBond } from './types/cerc/bond/message'; import { MsgCancelBondEncodeObject, MsgCreateBondEncodeObject, MsgRefillBondEncodeObject, MsgWithdrawBondEncodeObject, bondTypes, typeUrlMsgCancelBond, typeUrlMsgCreateBond, typeUrlMsgRefillBond, typeUrlMsgWithdrawBond } from './types/cerc/bond/message';
import { Coin } from './proto2/cosmos/base/v1beta1/coin'; import { Coin } from './proto/cosmos/base/v1beta1/coin';
import { MsgAssociateBondEncodeObject, MsgDeleteNameEncodeObject, MsgDissociateBondEncodeObject, MsgDissociateRecordsEncodeObject, MsgReassociateRecordsEncodeObject, MsgReserveAuthorityEncodeObject, MsgSetAuthorityBondEncodeObject, MsgSetNameEncodeObject, MsgSetRecordEncodeObject, registryTypes, typeUrlMsgAssociateBond, typeUrlMsgDeleteName, typeUrlMsgDissociateBond, typeUrlMsgDissociateRecords, typeUrlMsgReassociateRecords, typeUrlMsgReserveAuthority, typeUrlMsgSetAuthorityBond, typeUrlMsgSetName, typeUrlMsgSetRecord, NAMESERVICE_ERRORS } from './types/cerc/registry/message'; import { MsgAssociateBondEncodeObject, MsgDeleteNameEncodeObject, MsgDissociateBondEncodeObject, MsgDissociateRecordsEncodeObject, MsgReassociateRecordsEncodeObject, MsgReserveAuthorityEncodeObject, MsgSetAuthorityBondEncodeObject, MsgSetNameEncodeObject, MsgSetRecordEncodeObject, registryTypes, typeUrlMsgAssociateBond, typeUrlMsgDeleteName, typeUrlMsgDissociateBond, typeUrlMsgDissociateRecords, typeUrlMsgReassociateRecords, typeUrlMsgReserveAuthority, typeUrlMsgSetAuthorityBond, typeUrlMsgSetName, typeUrlMsgSetRecord, NAMESERVICE_ERRORS } from './types/cerc/registry/message';
import { MsgCommitBidEncodeObject, MsgRevealBidEncodeObject, auctionTypes, typeUrlMsgCommitBid, typeUrlMsgRevealBid } from './types/cerc/auction/message'; import { MsgCommitBidEncodeObject, MsgRevealBidEncodeObject, auctionTypes, typeUrlMsgCommitBid, typeUrlMsgRevealBid } from './types/cerc/auction/message';
import { MsgAssociateBondResponse, MsgDeleteNameResponse, MsgDissociateBondResponse, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse, MsgReserveAuthorityResponse, MsgSetAuthorityBondResponse, MsgSetNameResponse, MsgSetRecordResponse, Payload } from './proto2/cerc/registry/v1/tx'; import { MsgAssociateBondResponse, MsgDeleteNameResponse, MsgDissociateBondResponse, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse, MsgReserveAuthorityResponse, MsgSetAuthorityBondResponse, MsgSetNameResponse, MsgSetRecordResponse, Payload } from './proto/cerc/registry/v1/tx';
import { Record, Signature } from './proto2/cerc/registry/v1/registry'; import { Record, Signature } from './proto/cerc/registry/v1/registry';
import { Account } from './account'; import { Account } from './account';
import { Util } from './util'; import { Util } from './util';
import { MsgCommitBidResponse, MsgRevealBidResponse } from './proto2/cerc/auction/v1/tx'; import { MsgCommitBidResponse, MsgRevealBidResponse } from './proto/cerc/auction/v1/tx';
import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto2/cerc/bond/v1/tx'; import { MsgCancelBondResponse, MsgCreateBondResponse, MsgRefillBondResponse, MsgWithdrawBondResponse } from './proto/cerc/bond/v1/tx';
import { bankTypes } from './types/cosmos/bank/message'; import { bankTypes } from './types/cosmos/bank/message';
const DEFAULT_WRITE_ERROR = 'Unable to write to laconic2d.'; const DEFAULT_WRITE_ERROR = 'Unable to write to laconic2d.';

View File

@ -8,7 +8,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml');
jest.setTimeout(120 * 1000); jest.setTimeout(120 * 1000);
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
const nameserviceExpiryTests = () => { const nameserviceExpiryTests = () => {
let registry: Registry; let registry: Registry;
@ -21,7 +21,7 @@ const nameserviceExpiryTests = () => {
let recordExpiryTime: Date; let recordExpiryTime: Date;
beforeAll(async () => { beforeAll(async () => {
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
// Create bond. // Create bond.
bondId = await registry.getNextBondId(privateKey); bondId = await registry.getNextBondId(privateKey);

View File

@ -10,7 +10,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml');
jest.setTimeout(5 * 60 * 1000); jest.setTimeout(5 * 60 * 1000);
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
const namingTests = () => { const namingTests = () => {
let registry: Registry; let registry: Registry;
@ -20,7 +20,7 @@ const namingTests = () => {
let watcherId: string; let watcherId: string;
beforeAll(async () => { beforeAll(async () => {
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
// Create bond. // Create bond.
bondId = await registry.getNextBondId(privateKey); bondId = await registry.getNextBondId(privateKey);

View File

@ -1,259 +1,322 @@
// @ts-nocheck
/* eslint-disable */ /* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "cosmos.base.query.v1beta1";
/** /**
* Generated by the protoc-gen-ts. DO NOT EDIT! * PageRequest is to be embedded in gRPC request messages for efficient
* compiler version: 4.25.1 * pagination. Ex:
* source: cosmos/base/query/v1beta1/pagination.proto *
* git: https://github.com/thesayyn/protoc-gen-ts */ * message SomeRequest {
import * as pb_1 from "google-protobuf"; * Foo some_parameter = 1;
export namespace cosmos.base.query.v1beta1 { * PageRequest pagination = 2;
export class PageRequest extends pb_1.Message { * }
#one_of_decls: number[][] = []; */
constructor(data?: any[] | { export interface PageRequest {
key?: Uint8Array; /**
offset?: number; * key is a value returned in PageResponse.next_key to begin
limit?: number; * querying the next page most efficiently. Only one of offset or key
count_total?: boolean; * should be set.
reverse?: boolean; */
}) { key: Uint8Array;
super(); /**
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); * offset is a numeric offset that can be used when key is unavailable.
if (!Array.isArray(data) && typeof data == "object") { * It is less efficient than using key. Only one of offset or key should
if ("key" in data && data.key != undefined) { * be set.
this.key = data.key; */
} offset: Long;
if ("offset" in data && data.offset != undefined) { /**
this.offset = data.offset; * limit is the total number of results to be returned in the result page.
} * If left empty it will default to a value to be set by each app.
if ("limit" in data && data.limit != undefined) { */
this.limit = data.limit; limit: Long;
} /**
if ("count_total" in data && data.count_total != undefined) { * count_total is set to true to indicate that the result set should include
this.count_total = data.count_total; * a count of the total number of items available for pagination in UIs.
} * count_total is only respected when offset is used. It is ignored when key
if ("reverse" in data && data.reverse != undefined) { * is set.
this.reverse = data.reverse; */
} countTotal: boolean;
} /**
} * reverse is set to true if results are to be returned in the descending order.
get key() { *
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; * Since: cosmos-sdk 0.43
} */
set key(value: Uint8Array) { reverse: boolean;
pb_1.Message.setField(this, 1, value); }
}
get offset() { /**
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; * PageResponse is to be embedded in gRPC response messages where the
} * corresponding request message has used PageRequest.
set offset(value: number) { *
pb_1.Message.setField(this, 2, value); * message SomeResponse {
} * repeated Bar results = 1;
get limit() { * PageResponse page = 2;
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; * }
} */
set limit(value: number) { export interface PageResponse {
pb_1.Message.setField(this, 3, value); /**
} * next_key is the key to be passed to PageRequest.key to
get count_total() { * query the next page most efficiently. It will be empty if
return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; * there are no more results.
} */
set count_total(value: boolean) { nextKey: Uint8Array;
pb_1.Message.setField(this, 4, value); /**
} * total is total number of results available if PageRequest.count_total
get reverse() { * was set, its value is undefined otherwise
return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; */
} total: Long;
set reverse(value: boolean) { }
pb_1.Message.setField(this, 5, value);
} function createBasePageRequest(): PageRequest {
static fromObject(data: { return {
key?: Uint8Array; key: new Uint8Array(),
offset?: number; offset: Long.UZERO,
limit?: number; limit: Long.UZERO,
count_total?: boolean; countTotal: false,
reverse?: boolean; reverse: false,
}): PageRequest { };
const message = new PageRequest({}); }
if (data.key != null) {
message.key = data.key; export const PageRequest = {
} encode(
if (data.offset != null) { message: PageRequest,
message.offset = data.offset; writer: _m0.Writer = _m0.Writer.create()
} ): _m0.Writer {
if (data.limit != null) { if (message.key.length !== 0) {
message.limit = data.limit; writer.uint32(10).bytes(message.key);
} }
if (data.count_total != null) { if (!message.offset.isZero()) {
message.count_total = data.count_total; writer.uint32(16).uint64(message.offset);
} }
if (data.reverse != null) { if (!message.limit.isZero()) {
message.reverse = data.reverse; writer.uint32(24).uint64(message.limit);
} }
return message; if (message.countTotal === true) {
} writer.uint32(32).bool(message.countTotal);
toObject() { }
const data: { if (message.reverse === true) {
key?: Uint8Array; writer.uint32(40).bool(message.reverse);
offset?: number; }
limit?: number; return writer;
count_total?: boolean; },
reverse?: boolean;
} = {}; decode(input: _m0.Reader | Uint8Array, length?: number): PageRequest {
if (this.key != null) { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
data.key = this.key; let end = length === undefined ? reader.len : reader.pos + length;
} const message = createBasePageRequest();
if (this.offset != null) { while (reader.pos < end) {
data.offset = this.offset; const tag = reader.uint32();
} switch (tag >>> 3) {
if (this.limit != null) { case 1:
data.limit = this.limit; message.key = reader.bytes();
} break;
if (this.count_total != null) { case 2:
data.count_total = this.count_total; message.offset = reader.uint64() as Long;
} break;
if (this.reverse != null) { case 3:
data.reverse = this.reverse; message.limit = reader.uint64() as Long;
} break;
return data; case 4:
} message.countTotal = reader.bool();
serialize(): Uint8Array; break;
serialize(w: pb_1.BinaryWriter): void; case 5:
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { message.reverse = reader.bool();
const writer = w || new pb_1.BinaryWriter(); break;
if (this.key.length) default:
writer.writeBytes(1, this.key); reader.skipType(tag & 7);
if (this.offset != 0) break;
writer.writeUint64(2, this.offset); }
if (this.limit != 0) }
writer.writeUint64(3, this.limit); return message;
if (this.count_total != false) },
writer.writeBool(4, this.count_total);
if (this.reverse != false) fromJSON(object: any): PageRequest {
writer.writeBool(5, this.reverse); return {
if (!w) key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
return writer.getResultBuffer(); offset: isSet(object.offset) ? Long.fromValue(object.offset) : Long.UZERO,
} limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO,
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageRequest { countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false,
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageRequest(); reverse: isSet(object.reverse) ? Boolean(object.reverse) : false,
while (reader.nextField()) { };
if (reader.isEndGroup()) },
break;
switch (reader.getFieldNumber()) { toJSON(message: PageRequest): unknown {
case 1: const obj: any = {};
message.key = reader.readBytes(); message.key !== undefined &&
break; (obj.key = base64FromBytes(
case 2: message.key !== undefined ? message.key : new Uint8Array()
message.offset = reader.readUint64(); ));
break; message.offset !== undefined &&
case 3: (obj.offset = (message.offset || Long.UZERO).toString());
message.limit = reader.readUint64(); message.limit !== undefined &&
break; (obj.limit = (message.limit || Long.UZERO).toString());
case 4: message.countTotal !== undefined && (obj.countTotal = message.countTotal);
message.count_total = reader.readBool(); message.reverse !== undefined && (obj.reverse = message.reverse);
break; return obj;
case 5: },
message.reverse = reader.readBool();
break; fromPartial<I extends Exact<DeepPartial<PageRequest>, I>>(
default: reader.skipField(); object: I
} ): PageRequest {
} const message = createBasePageRequest();
return message; message.key = object.key ?? new Uint8Array();
} message.offset =
serializeBinary(): Uint8Array { object.offset !== undefined && object.offset !== null
return this.serialize(); ? Long.fromValue(object.offset)
} : Long.UZERO;
static deserializeBinary(bytes: Uint8Array): PageRequest { message.limit =
return PageRequest.deserialize(bytes); object.limit !== undefined && object.limit !== null
} ? Long.fromValue(object.limit)
} : Long.UZERO;
export class PageResponse extends pb_1.Message { message.countTotal = object.countTotal ?? false;
#one_of_decls: number[][] = []; message.reverse = object.reverse ?? false;
constructor(data?: any[] | { return message;
next_key?: Uint8Array; },
total?: number; };
}) {
super(); function createBasePageResponse(): PageResponse {
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); return { nextKey: new Uint8Array(), total: Long.UZERO };
if (!Array.isArray(data) && typeof data == "object") { }
if ("next_key" in data && data.next_key != undefined) {
this.next_key = data.next_key; export const PageResponse = {
} encode(
if ("total" in data && data.total != undefined) { message: PageResponse,
this.total = data.total; writer: _m0.Writer = _m0.Writer.create()
} ): _m0.Writer {
} if (message.nextKey.length !== 0) {
} writer.uint32(10).bytes(message.nextKey);
get next_key() { }
return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; if (!message.total.isZero()) {
} writer.uint32(16).uint64(message.total);
set next_key(value: Uint8Array) { }
pb_1.Message.setField(this, 1, value); return writer;
} },
get total() {
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; decode(input: _m0.Reader | Uint8Array, length?: number): PageResponse {
} const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
set total(value: number) { let end = length === undefined ? reader.len : reader.pos + length;
pb_1.Message.setField(this, 2, value); const message = createBasePageResponse();
} while (reader.pos < end) {
static fromObject(data: { const tag = reader.uint32();
next_key?: Uint8Array; switch (tag >>> 3) {
total?: number; case 1:
}): PageResponse { message.nextKey = reader.bytes();
const message = new PageResponse({}); break;
if (data.next_key != null) { case 2:
message.next_key = data.next_key; message.total = reader.uint64() as Long;
} break;
if (data.total != null) { default:
message.total = data.total; reader.skipType(tag & 7);
} break;
return message; }
} }
toObject() { return message;
const data: { },
next_key?: Uint8Array;
total?: number; fromJSON(object: any): PageResponse {
} = {}; return {
if (this.next_key != null) { nextKey: isSet(object.nextKey)
data.next_key = this.next_key; ? bytesFromBase64(object.nextKey)
} : new Uint8Array(),
if (this.total != null) { total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO,
data.total = this.total; };
} },
return data;
} toJSON(message: PageResponse): unknown {
serialize(): Uint8Array; const obj: any = {};
serialize(w: pb_1.BinaryWriter): void; message.nextKey !== undefined &&
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { (obj.nextKey = base64FromBytes(
const writer = w || new pb_1.BinaryWriter(); message.nextKey !== undefined ? message.nextKey : new Uint8Array()
if (this.next_key.length) ));
writer.writeBytes(1, this.next_key); message.total !== undefined &&
if (this.total != 0) (obj.total = (message.total || Long.UZERO).toString());
writer.writeUint64(2, this.total); return obj;
if (!w) },
return writer.getResultBuffer();
} fromPartial<I extends Exact<DeepPartial<PageResponse>, I>>(
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageResponse { object: I
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageResponse(); ): PageResponse {
while (reader.nextField()) { const message = createBasePageResponse();
if (reader.isEndGroup()) message.nextKey = object.nextKey ?? new Uint8Array();
break; message.total =
switch (reader.getFieldNumber()) { object.total !== undefined && object.total !== null
case 1: ? Long.fromValue(object.total)
message.next_key = reader.readBytes(); : Long.UZERO;
break; return message;
case 2: },
message.total = reader.readUint64(); };
break;
default: reader.skipField(); declare var self: any | undefined;
} declare var window: any | undefined;
} declare var global: any | undefined;
return message; var globalThis: any = (() => {
} if (typeof globalThis !== "undefined") return globalThis;
serializeBinary(): Uint8Array { if (typeof self !== "undefined") return self;
return this.serialize(); if (typeof window !== "undefined") return window;
} if (typeof global !== "undefined") return global;
static deserializeBinary(bytes: Uint8Array): PageResponse { throw "Unable to locate global object";
return PageResponse.deserialize(bytes); })();
}
} function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
}
return arr;
}
}
function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
bin.push(String.fromCharCode(byte));
});
return globalThis.btoa(bin.join(""));
}
}
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
} }

View File

@ -1,325 +1,303 @@
// @ts-nocheck
/* eslint-disable */ /* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "cosmos.base.v1beta1";
/** /**
* Generated by the protoc-gen-ts. DO NOT EDIT! * Coin defines a token with a denomination and an amount.
* compiler version: 4.25.1 *
* source: cosmos/base/v1beta1/coin.proto * NOTE: The amount field is an Int which implements the custom method
* git: https://github.com/thesayyn/protoc-gen-ts */ * signatures required by gogoproto.
import * as dependency_1 from "./../../../gogoproto/gogo"; */
import * as pb_1 from "google-protobuf"; export interface Coin {
export namespace cosmos.base.v1beta1 { denom: string;
export class Coin extends pb_1.Message { amount: string;
#one_of_decls: number[][] = []; }
constructor(data?: any[] | {
denom?: string; /**
amount?: string; * DecCoin defines a token with a denomination and a decimal amount.
}) { *
super(); * NOTE: The amount field is an Dec which implements the custom method
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); * signatures required by gogoproto.
if (!Array.isArray(data) && typeof data == "object") { */
if ("denom" in data && data.denom != undefined) { export interface DecCoin {
this.denom = data.denom; denom: string;
} amount: string;
if ("amount" in data && data.amount != undefined) { }
this.amount = data.amount;
} /**
} * IntProto defines a Protobuf wrapper around an Int object.
} * Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
get denom() { */
return pb_1.Message.getFieldWithDefault(this, 1, "") as string; export interface IntProto {
} int: string;
set denom(value: string) { }
pb_1.Message.setField(this, 1, value);
} /**
get amount() { * DecProto defines a Protobuf wrapper around a Dec object.
return pb_1.Message.getFieldWithDefault(this, 2, "") as string; * Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
} */
set amount(value: string) { export interface DecProto {
pb_1.Message.setField(this, 2, value); dec: string;
} }
static fromObject(data: {
denom?: string; function createBaseCoin(): Coin {
amount?: string; return { denom: "", amount: "" };
}): Coin { }
const message = new Coin({});
if (data.denom != null) { export const Coin = {
message.denom = data.denom; encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
} if (message.denom !== "") {
if (data.amount != null) { writer.uint32(10).string(message.denom);
message.amount = data.amount; }
} if (message.amount !== "") {
return message; writer.uint32(18).string(message.amount);
} }
toObject() { return writer;
const data: { },
denom?: string;
amount?: string; decode(input: _m0.Reader | Uint8Array, length?: number): Coin {
} = {}; const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
if (this.denom != null) { let end = length === undefined ? reader.len : reader.pos + length;
data.denom = this.denom; const message = createBaseCoin();
} while (reader.pos < end) {
if (this.amount != null) { const tag = reader.uint32();
data.amount = this.amount; switch (tag >>> 3) {
} case 1:
return data; message.denom = reader.string();
} break;
serialize(): Uint8Array; case 2:
serialize(w: pb_1.BinaryWriter): void; message.amount = reader.string();
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { break;
const writer = w || new pb_1.BinaryWriter(); default:
if (this.denom.length) reader.skipType(tag & 7);
writer.writeString(1, this.denom); break;
if (this.amount.length) }
writer.writeString(2, this.amount); }
if (!w) return message;
return writer.getResultBuffer(); },
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Coin { fromJSON(object: any): Coin {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Coin(); return {
while (reader.nextField()) { denom: isSet(object.denom) ? String(object.denom) : "",
if (reader.isEndGroup()) amount: isSet(object.amount) ? String(object.amount) : "",
break; };
switch (reader.getFieldNumber()) { },
case 1:
message.denom = reader.readString(); toJSON(message: Coin): unknown {
break; const obj: any = {};
case 2: message.denom !== undefined && (obj.denom = message.denom);
message.amount = reader.readString(); message.amount !== undefined && (obj.amount = message.amount);
break; return obj;
default: reader.skipField(); },
}
} fromPartial<I extends Exact<DeepPartial<Coin>, I>>(object: I): Coin {
return message; const message = createBaseCoin();
} message.denom = object.denom ?? "";
serializeBinary(): Uint8Array { message.amount = object.amount ?? "";
return this.serialize(); return message;
} },
static deserializeBinary(bytes: Uint8Array): Coin { };
return Coin.deserialize(bytes);
} function createBaseDecCoin(): DecCoin {
} return { denom: "", amount: "" };
export class DecCoin extends pb_1.Message { }
#one_of_decls: number[][] = [];
constructor(data?: any[] | { export const DecCoin = {
denom?: string; encode(
amount?: string; message: DecCoin,
}) { writer: _m0.Writer = _m0.Writer.create()
super(); ): _m0.Writer {
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (message.denom !== "") {
if (!Array.isArray(data) && typeof data == "object") { writer.uint32(10).string(message.denom);
if ("denom" in data && data.denom != undefined) { }
this.denom = data.denom; if (message.amount !== "") {
} writer.uint32(18).string(message.amount);
if ("amount" in data && data.amount != undefined) { }
this.amount = data.amount; return writer;
} },
}
} decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin {
get denom() { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
return pb_1.Message.getFieldWithDefault(this, 1, "") as string; let end = length === undefined ? reader.len : reader.pos + length;
} const message = createBaseDecCoin();
set denom(value: string) { while (reader.pos < end) {
pb_1.Message.setField(this, 1, value); const tag = reader.uint32();
} switch (tag >>> 3) {
get amount() { case 1:
return pb_1.Message.getFieldWithDefault(this, 2, "") as string; message.denom = reader.string();
} break;
set amount(value: string) { case 2:
pb_1.Message.setField(this, 2, value); message.amount = reader.string();
} break;
static fromObject(data: { default:
denom?: string; reader.skipType(tag & 7);
amount?: string; break;
}): DecCoin { }
const message = new DecCoin({}); }
if (data.denom != null) { return message;
message.denom = data.denom; },
}
if (data.amount != null) { fromJSON(object: any): DecCoin {
message.amount = data.amount; return {
} denom: isSet(object.denom) ? String(object.denom) : "",
return message; amount: isSet(object.amount) ? String(object.amount) : "",
} };
toObject() { },
const data: {
denom?: string; toJSON(message: DecCoin): unknown {
amount?: string; const obj: any = {};
} = {}; message.denom !== undefined && (obj.denom = message.denom);
if (this.denom != null) { message.amount !== undefined && (obj.amount = message.amount);
data.denom = this.denom; return obj;
} },
if (this.amount != null) {
data.amount = this.amount; fromPartial<I extends Exact<DeepPartial<DecCoin>, I>>(object: I): DecCoin {
} const message = createBaseDecCoin();
return data; message.denom = object.denom ?? "";
} message.amount = object.amount ?? "";
serialize(): Uint8Array; return message;
serialize(w: pb_1.BinaryWriter): void; },
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { };
const writer = w || new pb_1.BinaryWriter();
if (this.denom.length) function createBaseIntProto(): IntProto {
writer.writeString(1, this.denom); return { int: "" };
if (this.amount.length) }
writer.writeString(2, this.amount);
if (!w) export const IntProto = {
return writer.getResultBuffer(); encode(
} message: IntProto,
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecCoin { writer: _m0.Writer = _m0.Writer.create()
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecCoin(); ): _m0.Writer {
while (reader.nextField()) { if (message.int !== "") {
if (reader.isEndGroup()) writer.uint32(10).string(message.int);
break; }
switch (reader.getFieldNumber()) { return writer;
case 1: },
message.denom = reader.readString();
break; decode(input: _m0.Reader | Uint8Array, length?: number): IntProto {
case 2: const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
message.amount = reader.readString(); let end = length === undefined ? reader.len : reader.pos + length;
break; const message = createBaseIntProto();
default: reader.skipField(); while (reader.pos < end) {
} const tag = reader.uint32();
} switch (tag >>> 3) {
return message; case 1:
} message.int = reader.string();
serializeBinary(): Uint8Array { break;
return this.serialize(); default:
} reader.skipType(tag & 7);
static deserializeBinary(bytes: Uint8Array): DecCoin { break;
return DecCoin.deserialize(bytes); }
} }
} return message;
export class IntProto extends pb_1.Message { },
#one_of_decls: number[][] = [];
constructor(data?: any[] | { fromJSON(object: any): IntProto {
int?: string; return {
}) { int: isSet(object.int) ? String(object.int) : "",
super(); };
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); },
if (!Array.isArray(data) && typeof data == "object") {
if ("int" in data && data.int != undefined) { toJSON(message: IntProto): unknown {
this.int = data.int; const obj: any = {};
} message.int !== undefined && (obj.int = message.int);
} return obj;
} },
get int() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string; fromPartial<I extends Exact<DeepPartial<IntProto>, I>>(object: I): IntProto {
} const message = createBaseIntProto();
set int(value: string) { message.int = object.int ?? "";
pb_1.Message.setField(this, 1, value); return message;
} },
static fromObject(data: { };
int?: string;
}): IntProto { function createBaseDecProto(): DecProto {
const message = new IntProto({}); return { dec: "" };
if (data.int != null) { }
message.int = data.int;
} export const DecProto = {
return message; encode(
} message: DecProto,
toObject() { writer: _m0.Writer = _m0.Writer.create()
const data: { ): _m0.Writer {
int?: string; if (message.dec !== "") {
} = {}; writer.uint32(10).string(message.dec);
if (this.int != null) { }
data.int = this.int; return writer;
} },
return data;
} decode(input: _m0.Reader | Uint8Array, length?: number): DecProto {
serialize(): Uint8Array; const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
serialize(w: pb_1.BinaryWriter): void; let end = length === undefined ? reader.len : reader.pos + length;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { const message = createBaseDecProto();
const writer = w || new pb_1.BinaryWriter(); while (reader.pos < end) {
if (this.int.length) const tag = reader.uint32();
writer.writeString(1, this.int); switch (tag >>> 3) {
if (!w) case 1:
return writer.getResultBuffer(); message.dec = reader.string();
} break;
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IntProto { default:
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IntProto(); reader.skipType(tag & 7);
while (reader.nextField()) { break;
if (reader.isEndGroup()) }
break; }
switch (reader.getFieldNumber()) { return message;
case 1: },
message.int = reader.readString();
break; fromJSON(object: any): DecProto {
default: reader.skipField(); return {
} dec: isSet(object.dec) ? String(object.dec) : "",
} };
return message; },
}
serializeBinary(): Uint8Array { toJSON(message: DecProto): unknown {
return this.serialize(); const obj: any = {};
} message.dec !== undefined && (obj.dec = message.dec);
static deserializeBinary(bytes: Uint8Array): IntProto { return obj;
return IntProto.deserialize(bytes); },
}
} fromPartial<I extends Exact<DeepPartial<DecProto>, I>>(object: I): DecProto {
export class DecProto extends pb_1.Message { const message = createBaseDecProto();
#one_of_decls: number[][] = []; message.dec = object.dec ?? "";
constructor(data?: any[] | { return message;
dec?: string; },
}) { };
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); type Builtin =
if (!Array.isArray(data) && typeof data == "object") { | Date
if ("dec" in data && data.dec != undefined) { | Function
this.dec = data.dec; | Uint8Array
} | string
} | number
} | boolean
get dec() { | undefined;
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
} export type DeepPartial<T> = T extends Builtin
set dec(value: string) { ? T
pb_1.Message.setField(this, 1, value); : T extends Long
} ? string | number | Long
static fromObject(data: { : T extends Array<infer U>
dec?: string; ? Array<DeepPartial<U>>
}): DecProto { : T extends ReadonlyArray<infer U>
const message = new DecProto({}); ? ReadonlyArray<DeepPartial<U>>
if (data.dec != null) { : T extends {}
message.dec = data.dec; ? { [K in keyof T]?: DeepPartial<T[K]> }
} : Partial<T>;
return message;
} type KeysOfUnion<T> = T extends T ? keyof T : never;
toObject() { export type Exact<P, I extends P> = P extends Builtin
const data: { ? P
dec?: string; : P & { [K in keyof P]: Exact<P[K], I[K]> } & {
} = {}; [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
if (this.dec != null) { };
data.dec = this.dec;
} if (_m0.util.Long !== Long) {
return data; _m0.util.Long = Long as any;
} _m0.configure();
serialize(): Uint8Array; }
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { function isSet(value: any): boolean {
const writer = w || new pb_1.BinaryWriter(); return value !== null && value !== undefined;
if (this.dec.length)
writer.writeString(1, this.dec);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecProto {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecProto();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.dec = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): DecProto {
return DecProto.deserialize(bytes);
}
}
} }

View File

@ -1,9 +1,2 @@
// @ts-nocheck
/* eslint-disable */ /* eslint-disable */
/** export const protobufPackage = "gogoproto";
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: gogoproto/gogo.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../google/protobuf/descriptor";
export namespace gogoproto { }

View File

@ -1,10 +1,2 @@
// @ts-nocheck
/* eslint-disable */ /* eslint-disable */
/** export const protobufPackage = "google.api";
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: google/api/annotations.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./http";
import * as dependency_2 from "./../protobuf/descriptor";
export namespace google.api { }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +1,187 @@
// @ts-nocheck
/* eslint-disable */ /* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.protobuf";
/** /**
* Generated by the protoc-gen-ts. DO NOT EDIT! * A Duration represents a signed, fixed-length span of time represented
* compiler version: 4.25.1 * as a count of seconds and fractions of seconds at nanosecond
* source: google/protobuf/duration.proto * resolution. It is independent of any calendar and concepts like "day"
* git: https://github.com/thesayyn/protoc-gen-ts */ * or "month". It is related to Timestamp in that the difference between
import * as pb_1 from "google-protobuf"; * two Timestamp values is a Duration and it can be added or subtracted
export namespace google.protobuf { * from a Timestamp. Range is approximately +-10,000 years.
export class Duration extends pb_1.Message { *
#one_of_decls: number[][] = []; * # Examples
constructor(data?: any[] | { *
seconds?: number; * Example 1: Compute Duration from two Timestamps in pseudo code.
nanos?: number; *
}) { * Timestamp start = ...;
super(); * Timestamp end = ...;
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); * Duration duration = ...;
if (!Array.isArray(data) && typeof data == "object") { *
if ("seconds" in data && data.seconds != undefined) { * duration.seconds = end.seconds - start.seconds;
this.seconds = data.seconds; * duration.nanos = end.nanos - start.nanos;
} *
if ("nanos" in data && data.nanos != undefined) { * if (duration.seconds < 0 && duration.nanos > 0) {
this.nanos = data.nanos; * duration.seconds += 1;
} * duration.nanos -= 1000000000;
} * } else if (duration.seconds > 0 && duration.nanos < 0) {
} * duration.seconds -= 1;
get seconds() { * duration.nanos += 1000000000;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; * }
} *
set seconds(value: number) { * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
pb_1.Message.setField(this, 1, value); *
} * Timestamp start = ...;
get nanos() { * Duration duration = ...;
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; * Timestamp end = ...;
} *
set nanos(value: number) { * end.seconds = start.seconds + duration.seconds;
pb_1.Message.setField(this, 2, value); * end.nanos = start.nanos + duration.nanos;
} *
static fromObject(data: { * if (end.nanos < 0) {
seconds?: number; * end.seconds -= 1;
nanos?: number; * end.nanos += 1000000000;
}): Duration { * } else if (end.nanos >= 1000000000) {
const message = new Duration({}); * end.seconds += 1;
if (data.seconds != null) { * end.nanos -= 1000000000;
message.seconds = data.seconds; * }
} *
if (data.nanos != null) { * Example 3: Compute Duration from datetime.timedelta in Python.
message.nanos = data.nanos; *
} * td = datetime.timedelta(days=3, minutes=10)
return message; * duration = Duration()
} * duration.FromTimedelta(td)
toObject() { *
const data: { * # JSON Mapping
seconds?: number; *
nanos?: number; * In JSON format, the Duration type is encoded as a string rather than an
} = {}; * object, where the string ends in the suffix "s" (indicating seconds) and
if (this.seconds != null) { * is preceded by the number of seconds, with nanoseconds expressed as
data.seconds = this.seconds; * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
} * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
if (this.nanos != null) { * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
data.nanos = this.nanos; * microsecond should be expressed in JSON format as "3.000001s".
} */
return data; export interface Duration {
} /**
serialize(): Uint8Array; * Signed seconds of the span of time. Must be from -315,576,000,000
serialize(w: pb_1.BinaryWriter): void; * to +315,576,000,000 inclusive. Note: these bounds are computed from:
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
const writer = w || new pb_1.BinaryWriter(); */
if (this.seconds != 0) seconds: Long;
writer.writeInt64(1, this.seconds); /**
if (this.nanos != 0) * Signed fractions of a second at nanosecond resolution of the span
writer.writeInt32(2, this.nanos); * of time. Durations less than one second are represented with a 0
if (!w) * `seconds` field and a positive or negative `nanos` field. For durations
return writer.getResultBuffer(); * of one second or more, a non-zero value for the `nanos` field must be
} * of the same sign as the `seconds` field. Must be from -999,999,999
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Duration { * to +999,999,999 inclusive.
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Duration(); */
while (reader.nextField()) { nanos: number;
if (reader.isEndGroup()) }
break;
switch (reader.getFieldNumber()) { function createBaseDuration(): Duration {
case 1: return { seconds: Long.ZERO, nanos: 0 };
message.seconds = reader.readInt64(); }
break;
case 2: export const Duration = {
message.nanos = reader.readInt32(); encode(
break; message: Duration,
default: reader.skipField(); writer: _m0.Writer = _m0.Writer.create()
} ): _m0.Writer {
} if (!message.seconds.isZero()) {
return message; writer.uint32(8).int64(message.seconds);
} }
serializeBinary(): Uint8Array { if (message.nanos !== 0) {
return this.serialize(); writer.uint32(16).int32(message.nanos);
} }
static deserializeBinary(bytes: Uint8Array): Duration { return writer;
return Duration.deserialize(bytes); },
}
} decode(input: _m0.Reader | Uint8Array, length?: number): Duration {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDuration();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.seconds = reader.int64() as Long;
break;
case 2:
message.nanos = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Duration {
return {
seconds: isSet(object.seconds)
? Long.fromValue(object.seconds)
: Long.ZERO,
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
};
},
toJSON(message: Duration): unknown {
const obj: any = {};
message.seconds !== undefined &&
(obj.seconds = (message.seconds || Long.ZERO).toString());
message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
return obj;
},
fromPartial<I extends Exact<DeepPartial<Duration>, I>>(object: I): Duration {
const message = createBaseDuration();
message.seconds =
object.seconds !== undefined && object.seconds !== null
? Long.fromValue(object.seconds)
: Long.ZERO;
message.nanos = object.nanos ?? 0;
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
} }

View File

@ -1,100 +1,220 @@
// @ts-nocheck
/* eslint-disable */ /* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.protobuf";
/** /**
* Generated by the protoc-gen-ts. DO NOT EDIT! * A Timestamp represents a point in time independent of any time zone or local
* compiler version: 4.25.1 * calendar, encoded as a count of seconds and fractions of seconds at
* source: google/protobuf/timestamp.proto * nanosecond resolution. The count is relative to an epoch at UTC midnight on
* git: https://github.com/thesayyn/protoc-gen-ts */ * January 1, 1970, in the proleptic Gregorian calendar which extends the
import * as pb_1 from "google-protobuf"; * Gregorian calendar backwards to year one.
export namespace google.protobuf { *
export class Timestamp extends pb_1.Message { * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
#one_of_decls: number[][] = []; * second table is needed for interpretation, using a [24-hour linear
constructor(data?: any[] | { * smear](https://developers.google.com/time/smear).
seconds?: number; *
nanos?: number; * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
}) { * restricting to that range, we ensure that we can convert to and from [RFC
super(); * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); *
if (!Array.isArray(data) && typeof data == "object") { * # Examples
if ("seconds" in data && data.seconds != undefined) { *
this.seconds = data.seconds; * Example 1: Compute Timestamp from POSIX `time()`.
} *
if ("nanos" in data && data.nanos != undefined) { * Timestamp timestamp;
this.nanos = data.nanos; * timestamp.set_seconds(time(NULL));
} * timestamp.set_nanos(0);
} *
} * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
get seconds() { *
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; * struct timeval tv;
} * gettimeofday(&tv, NULL);
set seconds(value: number) { *
pb_1.Message.setField(this, 1, value); * Timestamp timestamp;
} * timestamp.set_seconds(tv.tv_sec);
get nanos() { * timestamp.set_nanos(tv.tv_usec * 1000);
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; *
} * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
set nanos(value: number) { *
pb_1.Message.setField(this, 2, value); * FILETIME ft;
} * GetSystemTimeAsFileTime(&ft);
static fromObject(data: { * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
seconds?: number; *
nanos?: number; * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
}): Timestamp { * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
const message = new Timestamp({}); * Timestamp timestamp;
if (data.seconds != null) { * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
message.seconds = data.seconds; * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
} *
if (data.nanos != null) { * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
message.nanos = data.nanos; *
} * long millis = System.currentTimeMillis();
return message; *
} * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
toObject() { * .setNanos((int) ((millis % 1000) * 1000000)).build();
const data: { *
seconds?: number; *
nanos?: number; * Example 5: Compute Timestamp from Java `Instant.now()`.
} = {}; *
if (this.seconds != null) { * Instant now = Instant.now();
data.seconds = this.seconds; *
} * Timestamp timestamp =
if (this.nanos != null) { * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
data.nanos = this.nanos; * .setNanos(now.getNano()).build();
} *
return data; *
} * Example 6: Compute Timestamp from current time in Python.
serialize(): Uint8Array; *
serialize(w: pb_1.BinaryWriter): void; * timestamp = Timestamp()
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { * timestamp.GetCurrentTime()
const writer = w || new pb_1.BinaryWriter(); *
if (this.seconds != 0) * # JSON Mapping
writer.writeInt64(1, this.seconds); *
if (this.nanos != 0) * In JSON format, the Timestamp type is encoded as a string in the
writer.writeInt32(2, this.nanos); * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
if (!w) * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
return writer.getResultBuffer(); * where {year} is always expressed using four digits while {month}, {day},
} * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timestamp { * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Timestamp(); * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
while (reader.nextField()) { * is required. A proto3 JSON serializer should always use UTC (as indicated by
if (reader.isEndGroup()) * "Z") when printing the Timestamp type and a proto3 JSON parser should be
break; * able to accept both UTC and other timezones (as indicated by an offset).
switch (reader.getFieldNumber()) { *
case 1: * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
message.seconds = reader.readInt64(); * 01:30 UTC on January 15, 2017.
break; *
case 2: * In JavaScript, one can convert a Date object to this format using the
message.nanos = reader.readInt32(); * standard
break; * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
default: reader.skipField(); * method. In Python, a standard `datetime.datetime` object can be converted
} * to this format using
} * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
return message; * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
} * the Joda Time's [`ISODateTimeFormat.dateTime()`](
serializeBinary(): Uint8Array { * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
return this.serialize(); * ) to obtain a formatter capable of generating timestamps in this format.
} */
static deserializeBinary(bytes: Uint8Array): Timestamp { export interface Timestamp {
return Timestamp.deserialize(bytes); /**
} * Represents seconds of UTC time since Unix epoch
} * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*/
seconds: Long;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*/
nanos: number;
}
function createBaseTimestamp(): Timestamp {
return { seconds: Long.ZERO, nanos: 0 };
}
export const Timestamp = {
encode(
message: Timestamp,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (!message.seconds.isZero()) {
writer.uint32(8).int64(message.seconds);
}
if (message.nanos !== 0) {
writer.uint32(16).int32(message.nanos);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTimestamp();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.seconds = reader.int64() as Long;
break;
case 2:
message.nanos = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Timestamp {
return {
seconds: isSet(object.seconds)
? Long.fromValue(object.seconds)
: Long.ZERO,
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
};
},
toJSON(message: Timestamp): unknown {
const obj: any = {};
message.seconds !== undefined &&
(obj.seconds = (message.seconds || Long.ZERO).toString());
message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
return obj;
},
fromPartial<I extends Exact<DeepPartial<Timestamp>, I>>(
object: I
): Timestamp {
const message = createBaseTimestamp();
message.seconds =
object.seconds !== undefined && object.seconds !== null
? Long.fromValue(object.seconds)
: Long.ZERO;
message.nanos = object.nanos ?? 0;
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
} }

View File

@ -1,105 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/auction/v1beta1/genesis.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./types";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.auction.v1beta1 {
export class GenesisState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
params?: dependency_2.vulcanize.auction.v1beta1.Params;
auctions?: dependency_2.vulcanize.auction.v1beta1.Auction[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("params" in data && data.params != undefined) {
this.params = data.params;
}
if ("auctions" in data && data.auctions != undefined) {
this.auctions = data.auctions;
}
}
}
get params() {
return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.auction.v1beta1.Params, 1) as dependency_2.vulcanize.auction.v1beta1.Params;
}
set params(value: dependency_2.vulcanize.auction.v1beta1.Params) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_params() {
return pb_1.Message.getField(this, 1) != null;
}
get auctions() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.auction.v1beta1.Auction, 2) as dependency_2.vulcanize.auction.v1beta1.Auction[];
}
set auctions(value: dependency_2.vulcanize.auction.v1beta1.Auction[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
static fromObject(data: {
params?: ReturnType<typeof dependency_2.vulcanize.auction.v1beta1.Params.prototype.toObject>;
auctions?: ReturnType<typeof dependency_2.vulcanize.auction.v1beta1.Auction.prototype.toObject>[];
}): GenesisState {
const message = new GenesisState({});
if (data.params != null) {
message.params = dependency_2.vulcanize.auction.v1beta1.Params.fromObject(data.params);
}
if (data.auctions != null) {
message.auctions = data.auctions.map(item => dependency_2.vulcanize.auction.v1beta1.Auction.fromObject(item));
}
return message;
}
toObject() {
const data: {
params?: ReturnType<typeof dependency_2.vulcanize.auction.v1beta1.Params.prototype.toObject>;
auctions?: ReturnType<typeof dependency_2.vulcanize.auction.v1beta1.Auction.prototype.toObject>[];
} = {};
if (this.params != null) {
data.params = this.params.toObject();
}
if (this.auctions != null) {
data.auctions = this.auctions.map((item: dependency_2.vulcanize.auction.v1beta1.Auction) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_params)
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
if (this.auctions.length)
writer.writeRepeatedMessage(2, this.auctions, (item: dependency_2.vulcanize.auction.v1beta1.Auction) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.auction.v1beta1.Params.deserialize(reader));
break;
case 2:
reader.readMessage(message.auctions, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.auction.v1beta1.Auction.deserialize(reader), dependency_2.vulcanize.auction.v1beta1.Auction));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): GenesisState {
return GenesisState.deserialize(bytes);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,647 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/auction/v1beta1/tx.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./../../../google/protobuf/duration";
import * as dependency_3 from "./../../../cosmos/base/v1beta1/coin";
import * as dependency_4 from "./types";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.auction.v1beta1 {
export class MsgCreateAuction extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
commits_duration?: dependency_2.google.protobuf.Duration;
reveals_duration?: dependency_2.google.protobuf.Duration;
commit_fee?: dependency_3.cosmos.base.v1beta1.Coin;
reveal_fee?: dependency_3.cosmos.base.v1beta1.Coin;
minimum_bid?: dependency_3.cosmos.base.v1beta1.Coin;
signer?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("commits_duration" in data && data.commits_duration != undefined) {
this.commits_duration = data.commits_duration;
}
if ("reveals_duration" in data && data.reveals_duration != undefined) {
this.reveals_duration = data.reveals_duration;
}
if ("commit_fee" in data && data.commit_fee != undefined) {
this.commit_fee = data.commit_fee;
}
if ("reveal_fee" in data && data.reveal_fee != undefined) {
this.reveal_fee = data.reveal_fee;
}
if ("minimum_bid" in data && data.minimum_bid != undefined) {
this.minimum_bid = data.minimum_bid;
}
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
}
}
get commits_duration() {
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 1) as dependency_2.google.protobuf.Duration;
}
set commits_duration(value: dependency_2.google.protobuf.Duration) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_commits_duration() {
return pb_1.Message.getField(this, 1) != null;
}
get reveals_duration() {
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration;
}
set reveals_duration(value: dependency_2.google.protobuf.Duration) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_reveals_duration() {
return pb_1.Message.getField(this, 2) != null;
}
get commit_fee() {
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 3) as dependency_3.cosmos.base.v1beta1.Coin;
}
set commit_fee(value: dependency_3.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 3, value);
}
get has_commit_fee() {
return pb_1.Message.getField(this, 3) != null;
}
get reveal_fee() {
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 4) as dependency_3.cosmos.base.v1beta1.Coin;
}
set reveal_fee(value: dependency_3.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 4, value);
}
get has_reveal_fee() {
return pb_1.Message.getField(this, 4) != null;
}
get minimum_bid() {
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 5) as dependency_3.cosmos.base.v1beta1.Coin;
}
set minimum_bid(value: dependency_3.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 5, value);
}
get has_minimum_bid() {
return pb_1.Message.getField(this, 5) != null;
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 6, value);
}
static fromObject(data: {
commits_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
reveals_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_3.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_3.cosmos.base.v1beta1.Coin.prototype.toObject>;
minimum_bid?: ReturnType<typeof dependency_3.cosmos.base.v1beta1.Coin.prototype.toObject>;
signer?: string;
}): MsgCreateAuction {
const message = new MsgCreateAuction({});
if (data.commits_duration != null) {
message.commits_duration = dependency_2.google.protobuf.Duration.fromObject(data.commits_duration);
}
if (data.reveals_duration != null) {
message.reveals_duration = dependency_2.google.protobuf.Duration.fromObject(data.reveals_duration);
}
if (data.commit_fee != null) {
message.commit_fee = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee);
}
if (data.reveal_fee != null) {
message.reveal_fee = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee);
}
if (data.minimum_bid != null) {
message.minimum_bid = dependency_3.cosmos.base.v1beta1.Coin.fromObject(data.minimum_bid);
}
if (data.signer != null) {
message.signer = data.signer;
}
return message;
}
toObject() {
const data: {
commits_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
reveals_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_3.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_3.cosmos.base.v1beta1.Coin.prototype.toObject>;
minimum_bid?: ReturnType<typeof dependency_3.cosmos.base.v1beta1.Coin.prototype.toObject>;
signer?: string;
} = {};
if (this.commits_duration != null) {
data.commits_duration = this.commits_duration.toObject();
}
if (this.reveals_duration != null) {
data.reveals_duration = this.reveals_duration.toObject();
}
if (this.commit_fee != null) {
data.commit_fee = this.commit_fee.toObject();
}
if (this.reveal_fee != null) {
data.reveal_fee = this.reveal_fee.toObject();
}
if (this.minimum_bid != null) {
data.minimum_bid = this.minimum_bid.toObject();
}
if (this.signer != null) {
data.signer = this.signer;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_commits_duration)
writer.writeMessage(1, this.commits_duration, () => this.commits_duration.serialize(writer));
if (this.has_reveals_duration)
writer.writeMessage(2, this.reveals_duration, () => this.reveals_duration.serialize(writer));
if (this.has_commit_fee)
writer.writeMessage(3, this.commit_fee, () => this.commit_fee.serialize(writer));
if (this.has_reveal_fee)
writer.writeMessage(4, this.reveal_fee, () => this.reveal_fee.serialize(writer));
if (this.has_minimum_bid)
writer.writeMessage(5, this.minimum_bid, () => this.minimum_bid.serialize(writer));
if (this.signer.length)
writer.writeString(6, this.signer);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateAuction {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateAuction();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.commits_duration, () => message.commits_duration = dependency_2.google.protobuf.Duration.deserialize(reader));
break;
case 2:
reader.readMessage(message.reveals_duration, () => message.reveals_duration = dependency_2.google.protobuf.Duration.deserialize(reader));
break;
case 3:
reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 4:
reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 5:
reader.readMessage(message.minimum_bid, () => message.minimum_bid = dependency_3.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 6:
message.signer = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCreateAuction {
return MsgCreateAuction.deserialize(bytes);
}
}
export class MsgCreateAuctionResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
auction?: dependency_4.vulcanize.auction.v1beta1.Auction;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("auction" in data && data.auction != undefined) {
this.auction = data.auction;
}
}
}
get auction() {
return pb_1.Message.getWrapperField(this, dependency_4.vulcanize.auction.v1beta1.Auction, 1) as dependency_4.vulcanize.auction.v1beta1.Auction;
}
set auction(value: dependency_4.vulcanize.auction.v1beta1.Auction) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_auction() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
auction?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
}): MsgCreateAuctionResponse {
const message = new MsgCreateAuctionResponse({});
if (data.auction != null) {
message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.fromObject(data.auction);
}
return message;
}
toObject() {
const data: {
auction?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
} = {};
if (this.auction != null) {
data.auction = this.auction.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_auction)
writer.writeMessage(1, this.auction, () => this.auction.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateAuctionResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateAuctionResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.auction, () => message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCreateAuctionResponse {
return MsgCreateAuctionResponse.deserialize(bytes);
}
}
export class MsgCommitBid extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
auction_id?: string;
commit_hash?: string;
signer?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("auction_id" in data && data.auction_id != undefined) {
this.auction_id = data.auction_id;
}
if ("commit_hash" in data && data.commit_hash != undefined) {
this.commit_hash = data.commit_hash;
}
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
}
}
get auction_id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set auction_id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get commit_hash() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set commit_hash(value: string) {
pb_1.Message.setField(this, 2, value);
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
auction_id?: string;
commit_hash?: string;
signer?: string;
}): MsgCommitBid {
const message = new MsgCommitBid({});
if (data.auction_id != null) {
message.auction_id = data.auction_id;
}
if (data.commit_hash != null) {
message.commit_hash = data.commit_hash;
}
if (data.signer != null) {
message.signer = data.signer;
}
return message;
}
toObject() {
const data: {
auction_id?: string;
commit_hash?: string;
signer?: string;
} = {};
if (this.auction_id != null) {
data.auction_id = this.auction_id;
}
if (this.commit_hash != null) {
data.commit_hash = this.commit_hash;
}
if (this.signer != null) {
data.signer = this.signer;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.auction_id.length)
writer.writeString(1, this.auction_id);
if (this.commit_hash.length)
writer.writeString(2, this.commit_hash);
if (this.signer.length)
writer.writeString(3, this.signer);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommitBid {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCommitBid();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.auction_id = reader.readString();
break;
case 2:
message.commit_hash = reader.readString();
break;
case 3:
message.signer = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCommitBid {
return MsgCommitBid.deserialize(bytes);
}
}
export class MsgRevealBid extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
auction_id?: string;
reveal?: string;
signer?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("auction_id" in data && data.auction_id != undefined) {
this.auction_id = data.auction_id;
}
if ("reveal" in data && data.reveal != undefined) {
this.reveal = data.reveal;
}
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
}
}
get auction_id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set auction_id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get reveal() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set reveal(value: string) {
pb_1.Message.setField(this, 2, value);
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
auction_id?: string;
reveal?: string;
signer?: string;
}): MsgRevealBid {
const message = new MsgRevealBid({});
if (data.auction_id != null) {
message.auction_id = data.auction_id;
}
if (data.reveal != null) {
message.reveal = data.reveal;
}
if (data.signer != null) {
message.signer = data.signer;
}
return message;
}
toObject() {
const data: {
auction_id?: string;
reveal?: string;
signer?: string;
} = {};
if (this.auction_id != null) {
data.auction_id = this.auction_id;
}
if (this.reveal != null) {
data.reveal = this.reveal;
}
if (this.signer != null) {
data.signer = this.signer;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.auction_id.length)
writer.writeString(1, this.auction_id);
if (this.reveal.length)
writer.writeString(2, this.reveal);
if (this.signer.length)
writer.writeString(3, this.signer);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevealBid {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevealBid();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.auction_id = reader.readString();
break;
case 2:
message.reveal = reader.readString();
break;
case 3:
message.signer = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgRevealBid {
return MsgRevealBid.deserialize(bytes);
}
}
export class MsgCommitBidResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
bid?: dependency_4.vulcanize.auction.v1beta1.Bid;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("bid" in data && data.bid != undefined) {
this.bid = data.bid;
}
}
}
get bid() {
return pb_1.Message.getWrapperField(this, dependency_4.vulcanize.auction.v1beta1.Bid, 1) as dependency_4.vulcanize.auction.v1beta1.Bid;
}
set bid(value: dependency_4.vulcanize.auction.v1beta1.Bid) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_bid() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
bid?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Bid.prototype.toObject>;
}): MsgCommitBidResponse {
const message = new MsgCommitBidResponse({});
if (data.bid != null) {
message.bid = dependency_4.vulcanize.auction.v1beta1.Bid.fromObject(data.bid);
}
return message;
}
toObject() {
const data: {
bid?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Bid.prototype.toObject>;
} = {};
if (this.bid != null) {
data.bid = this.bid.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_bid)
writer.writeMessage(1, this.bid, () => this.bid.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommitBidResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCommitBidResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.bid, () => message.bid = dependency_4.vulcanize.auction.v1beta1.Bid.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCommitBidResponse {
return MsgCommitBidResponse.deserialize(bytes);
}
}
export class MsgRevealBidResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
auction?: dependency_4.vulcanize.auction.v1beta1.Auction;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("auction" in data && data.auction != undefined) {
this.auction = data.auction;
}
}
}
get auction() {
return pb_1.Message.getWrapperField(this, dependency_4.vulcanize.auction.v1beta1.Auction, 1) as dependency_4.vulcanize.auction.v1beta1.Auction;
}
set auction(value: dependency_4.vulcanize.auction.v1beta1.Auction) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_auction() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
auction?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
}): MsgRevealBidResponse {
const message = new MsgRevealBidResponse({});
if (data.auction != null) {
message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.fromObject(data.auction);
}
return message;
}
toObject() {
const data: {
auction?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
} = {};
if (this.auction != null) {
data.auction = this.auction.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_auction)
writer.writeMessage(1, this.auction, () => this.auction.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevealBidResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRevealBidResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.auction, () => message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgRevealBidResponse {
return MsgRevealBidResponse.deserialize(bytes);
}
}
}

View File

@ -1,865 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/auction/v1beta1/types.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./../../../google/protobuf/duration";
import * as dependency_3 from "./../../../google/protobuf/timestamp";
import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.auction.v1beta1 {
export class Params extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
commits_duration?: dependency_2.google.protobuf.Duration;
reveals_duration?: dependency_2.google.protobuf.Duration;
commit_fee?: dependency_4.cosmos.base.v1beta1.Coin;
reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin;
minimum_bid?: dependency_4.cosmos.base.v1beta1.Coin;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("commits_duration" in data && data.commits_duration != undefined) {
this.commits_duration = data.commits_duration;
}
if ("reveals_duration" in data && data.reveals_duration != undefined) {
this.reveals_duration = data.reveals_duration;
}
if ("commit_fee" in data && data.commit_fee != undefined) {
this.commit_fee = data.commit_fee;
}
if ("reveal_fee" in data && data.reveal_fee != undefined) {
this.reveal_fee = data.reveal_fee;
}
if ("minimum_bid" in data && data.minimum_bid != undefined) {
this.minimum_bid = data.minimum_bid;
}
}
}
get commits_duration() {
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 1) as dependency_2.google.protobuf.Duration;
}
set commits_duration(value: dependency_2.google.protobuf.Duration) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_commits_duration() {
return pb_1.Message.getField(this, 1) != null;
}
get reveals_duration() {
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2) as dependency_2.google.protobuf.Duration;
}
set reveals_duration(value: dependency_2.google.protobuf.Duration) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_reveals_duration() {
return pb_1.Message.getField(this, 2) != null;
}
get commit_fee() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 3) as dependency_4.cosmos.base.v1beta1.Coin;
}
set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 3, value);
}
get has_commit_fee() {
return pb_1.Message.getField(this, 3) != null;
}
get reveal_fee() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 4) as dependency_4.cosmos.base.v1beta1.Coin;
}
set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 4, value);
}
get has_reveal_fee() {
return pb_1.Message.getField(this, 4) != null;
}
get minimum_bid() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 5) as dependency_4.cosmos.base.v1beta1.Coin;
}
set minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 5, value);
}
get has_minimum_bid() {
return pb_1.Message.getField(this, 5) != null;
}
static fromObject(data: {
commits_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
reveals_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
}): Params {
const message = new Params({});
if (data.commits_duration != null) {
message.commits_duration = dependency_2.google.protobuf.Duration.fromObject(data.commits_duration);
}
if (data.reveals_duration != null) {
message.reveals_duration = dependency_2.google.protobuf.Duration.fromObject(data.reveals_duration);
}
if (data.commit_fee != null) {
message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee);
}
if (data.reveal_fee != null) {
message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee);
}
if (data.minimum_bid != null) {
message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.minimum_bid);
}
return message;
}
toObject() {
const data: {
commits_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
reveals_duration?: ReturnType<typeof dependency_2.google.protobuf.Duration.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
} = {};
if (this.commits_duration != null) {
data.commits_duration = this.commits_duration.toObject();
}
if (this.reveals_duration != null) {
data.reveals_duration = this.reveals_duration.toObject();
}
if (this.commit_fee != null) {
data.commit_fee = this.commit_fee.toObject();
}
if (this.reveal_fee != null) {
data.reveal_fee = this.reveal_fee.toObject();
}
if (this.minimum_bid != null) {
data.minimum_bid = this.minimum_bid.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_commits_duration)
writer.writeMessage(1, this.commits_duration, () => this.commits_duration.serialize(writer));
if (this.has_reveals_duration)
writer.writeMessage(2, this.reveals_duration, () => this.reveals_duration.serialize(writer));
if (this.has_commit_fee)
writer.writeMessage(3, this.commit_fee, () => this.commit_fee.serialize(writer));
if (this.has_reveal_fee)
writer.writeMessage(4, this.reveal_fee, () => this.reveal_fee.serialize(writer));
if (this.has_minimum_bid)
writer.writeMessage(5, this.minimum_bid, () => this.minimum_bid.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.commits_duration, () => message.commits_duration = dependency_2.google.protobuf.Duration.deserialize(reader));
break;
case 2:
reader.readMessage(message.reveals_duration, () => message.reveals_duration = dependency_2.google.protobuf.Duration.deserialize(reader));
break;
case 3:
reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 4:
reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 5:
reader.readMessage(message.minimum_bid, () => message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Params {
return Params.deserialize(bytes);
}
}
export class Auction extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
status?: string;
owner_address?: string;
create_time?: dependency_3.google.protobuf.Timestamp;
commits_end_time?: dependency_3.google.protobuf.Timestamp;
reveals_end_time?: dependency_3.google.protobuf.Timestamp;
commit_fee?: dependency_4.cosmos.base.v1beta1.Coin;
reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin;
minimum_bid?: dependency_4.cosmos.base.v1beta1.Coin;
winner_address?: string;
winning_bid?: dependency_4.cosmos.base.v1beta1.Coin;
winning_price?: dependency_4.cosmos.base.v1beta1.Coin;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
if ("status" in data && data.status != undefined) {
this.status = data.status;
}
if ("owner_address" in data && data.owner_address != undefined) {
this.owner_address = data.owner_address;
}
if ("create_time" in data && data.create_time != undefined) {
this.create_time = data.create_time;
}
if ("commits_end_time" in data && data.commits_end_time != undefined) {
this.commits_end_time = data.commits_end_time;
}
if ("reveals_end_time" in data && data.reveals_end_time != undefined) {
this.reveals_end_time = data.reveals_end_time;
}
if ("commit_fee" in data && data.commit_fee != undefined) {
this.commit_fee = data.commit_fee;
}
if ("reveal_fee" in data && data.reveal_fee != undefined) {
this.reveal_fee = data.reveal_fee;
}
if ("minimum_bid" in data && data.minimum_bid != undefined) {
this.minimum_bid = data.minimum_bid;
}
if ("winner_address" in data && data.winner_address != undefined) {
this.winner_address = data.winner_address;
}
if ("winning_bid" in data && data.winning_bid != undefined) {
this.winning_bid = data.winning_bid;
}
if ("winning_price" in data && data.winning_price != undefined) {
this.winning_price = data.winning_price;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get status() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set status(value: string) {
pb_1.Message.setField(this, 2, value);
}
get owner_address() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set owner_address(value: string) {
pb_1.Message.setField(this, 3, value);
}
get create_time() {
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 4) as dependency_3.google.protobuf.Timestamp;
}
set create_time(value: dependency_3.google.protobuf.Timestamp) {
pb_1.Message.setWrapperField(this, 4, value);
}
get has_create_time() {
return pb_1.Message.getField(this, 4) != null;
}
get commits_end_time() {
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp;
}
set commits_end_time(value: dependency_3.google.protobuf.Timestamp) {
pb_1.Message.setWrapperField(this, 5, value);
}
get has_commits_end_time() {
return pb_1.Message.getField(this, 5) != null;
}
get reveals_end_time() {
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 6) as dependency_3.google.protobuf.Timestamp;
}
set reveals_end_time(value: dependency_3.google.protobuf.Timestamp) {
pb_1.Message.setWrapperField(this, 6, value);
}
get has_reveals_end_time() {
return pb_1.Message.getField(this, 6) != null;
}
get commit_fee() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 7) as dependency_4.cosmos.base.v1beta1.Coin;
}
set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 7, value);
}
get has_commit_fee() {
return pb_1.Message.getField(this, 7) != null;
}
get reveal_fee() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 8) as dependency_4.cosmos.base.v1beta1.Coin;
}
set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 8, value);
}
get has_reveal_fee() {
return pb_1.Message.getField(this, 8) != null;
}
get minimum_bid() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9) as dependency_4.cosmos.base.v1beta1.Coin;
}
set minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 9, value);
}
get has_minimum_bid() {
return pb_1.Message.getField(this, 9) != null;
}
get winner_address() {
return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
}
set winner_address(value: string) {
pb_1.Message.setField(this, 10, value);
}
get winning_bid() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 11) as dependency_4.cosmos.base.v1beta1.Coin;
}
set winning_bid(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 11, value);
}
get has_winning_bid() {
return pb_1.Message.getField(this, 11) != null;
}
get winning_price() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 12) as dependency_4.cosmos.base.v1beta1.Coin;
}
set winning_price(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 12, value);
}
get has_winning_price() {
return pb_1.Message.getField(this, 12) != null;
}
static fromObject(data: {
id?: string;
status?: string;
owner_address?: string;
create_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
commits_end_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
reveals_end_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
winner_address?: string;
winning_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
winning_price?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
}): Auction {
const message = new Auction({});
if (data.id != null) {
message.id = data.id;
}
if (data.status != null) {
message.status = data.status;
}
if (data.owner_address != null) {
message.owner_address = data.owner_address;
}
if (data.create_time != null) {
message.create_time = dependency_3.google.protobuf.Timestamp.fromObject(data.create_time);
}
if (data.commits_end_time != null) {
message.commits_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.commits_end_time);
}
if (data.reveals_end_time != null) {
message.reveals_end_time = dependency_3.google.protobuf.Timestamp.fromObject(data.reveals_end_time);
}
if (data.commit_fee != null) {
message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee);
}
if (data.reveal_fee != null) {
message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee);
}
if (data.minimum_bid != null) {
message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.minimum_bid);
}
if (data.winner_address != null) {
message.winner_address = data.winner_address;
}
if (data.winning_bid != null) {
message.winning_bid = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.winning_bid);
}
if (data.winning_price != null) {
message.winning_price = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.winning_price);
}
return message;
}
toObject() {
const data: {
id?: string;
status?: string;
owner_address?: string;
create_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
commits_end_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
reveals_end_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
winner_address?: string;
winning_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
winning_price?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
} = {};
if (this.id != null) {
data.id = this.id;
}
if (this.status != null) {
data.status = this.status;
}
if (this.owner_address != null) {
data.owner_address = this.owner_address;
}
if (this.create_time != null) {
data.create_time = this.create_time.toObject();
}
if (this.commits_end_time != null) {
data.commits_end_time = this.commits_end_time.toObject();
}
if (this.reveals_end_time != null) {
data.reveals_end_time = this.reveals_end_time.toObject();
}
if (this.commit_fee != null) {
data.commit_fee = this.commit_fee.toObject();
}
if (this.reveal_fee != null) {
data.reveal_fee = this.reveal_fee.toObject();
}
if (this.minimum_bid != null) {
data.minimum_bid = this.minimum_bid.toObject();
}
if (this.winner_address != null) {
data.winner_address = this.winner_address;
}
if (this.winning_bid != null) {
data.winning_bid = this.winning_bid.toObject();
}
if (this.winning_price != null) {
data.winning_price = this.winning_price.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.status.length)
writer.writeString(2, this.status);
if (this.owner_address.length)
writer.writeString(3, this.owner_address);
if (this.has_create_time)
writer.writeMessage(4, this.create_time, () => this.create_time.serialize(writer));
if (this.has_commits_end_time)
writer.writeMessage(5, this.commits_end_time, () => this.commits_end_time.serialize(writer));
if (this.has_reveals_end_time)
writer.writeMessage(6, this.reveals_end_time, () => this.reveals_end_time.serialize(writer));
if (this.has_commit_fee)
writer.writeMessage(7, this.commit_fee, () => this.commit_fee.serialize(writer));
if (this.has_reveal_fee)
writer.writeMessage(8, this.reveal_fee, () => this.reveal_fee.serialize(writer));
if (this.has_minimum_bid)
writer.writeMessage(9, this.minimum_bid, () => this.minimum_bid.serialize(writer));
if (this.winner_address.length)
writer.writeString(10, this.winner_address);
if (this.has_winning_bid)
writer.writeMessage(11, this.winning_bid, () => this.winning_bid.serialize(writer));
if (this.has_winning_price)
writer.writeMessage(12, this.winning_price, () => this.winning_price.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Auction {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Auction();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
case 2:
message.status = reader.readString();
break;
case 3:
message.owner_address = reader.readString();
break;
case 4:
reader.readMessage(message.create_time, () => message.create_time = dependency_3.google.protobuf.Timestamp.deserialize(reader));
break;
case 5:
reader.readMessage(message.commits_end_time, () => message.commits_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader));
break;
case 6:
reader.readMessage(message.reveals_end_time, () => message.reveals_end_time = dependency_3.google.protobuf.Timestamp.deserialize(reader));
break;
case 7:
reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 8:
reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 9:
reader.readMessage(message.minimum_bid, () => message.minimum_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 10:
message.winner_address = reader.readString();
break;
case 11:
reader.readMessage(message.winning_bid, () => message.winning_bid = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 12:
reader.readMessage(message.winning_price, () => message.winning_price = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Auction {
return Auction.deserialize(bytes);
}
}
export class Auctions extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
auctions?: Auction[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("auctions" in data && data.auctions != undefined) {
this.auctions = data.auctions;
}
}
}
get auctions() {
return pb_1.Message.getRepeatedWrapperField(this, Auction, 1) as Auction[];
}
set auctions(value: Auction[]) {
pb_1.Message.setRepeatedWrapperField(this, 1, value);
}
static fromObject(data: {
auctions?: ReturnType<typeof Auction.prototype.toObject>[];
}): Auctions {
const message = new Auctions({});
if (data.auctions != null) {
message.auctions = data.auctions.map(item => Auction.fromObject(item));
}
return message;
}
toObject() {
const data: {
auctions?: ReturnType<typeof Auction.prototype.toObject>[];
} = {};
if (this.auctions != null) {
data.auctions = this.auctions.map((item: Auction) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.auctions.length)
writer.writeRepeatedMessage(1, this.auctions, (item: Auction) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Auctions {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Auctions();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.auctions, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Auction.deserialize(reader), Auction));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Auctions {
return Auctions.deserialize(bytes);
}
}
export class Bid extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
auction_id?: string;
bidder_address?: string;
status?: string;
commit_hash?: string;
commit_time?: dependency_3.google.protobuf.Timestamp;
commit_fee?: dependency_4.cosmos.base.v1beta1.Coin;
reveal_time?: dependency_3.google.protobuf.Timestamp;
reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin;
bid_amount?: dependency_4.cosmos.base.v1beta1.Coin;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("auction_id" in data && data.auction_id != undefined) {
this.auction_id = data.auction_id;
}
if ("bidder_address" in data && data.bidder_address != undefined) {
this.bidder_address = data.bidder_address;
}
if ("status" in data && data.status != undefined) {
this.status = data.status;
}
if ("commit_hash" in data && data.commit_hash != undefined) {
this.commit_hash = data.commit_hash;
}
if ("commit_time" in data && data.commit_time != undefined) {
this.commit_time = data.commit_time;
}
if ("commit_fee" in data && data.commit_fee != undefined) {
this.commit_fee = data.commit_fee;
}
if ("reveal_time" in data && data.reveal_time != undefined) {
this.reveal_time = data.reveal_time;
}
if ("reveal_fee" in data && data.reveal_fee != undefined) {
this.reveal_fee = data.reveal_fee;
}
if ("bid_amount" in data && data.bid_amount != undefined) {
this.bid_amount = data.bid_amount;
}
}
}
get auction_id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set auction_id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get bidder_address() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set bidder_address(value: string) {
pb_1.Message.setField(this, 2, value);
}
get status() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set status(value: string) {
pb_1.Message.setField(this, 3, value);
}
get commit_hash() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set commit_hash(value: string) {
pb_1.Message.setField(this, 4, value);
}
get commit_time() {
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5) as dependency_3.google.protobuf.Timestamp;
}
set commit_time(value: dependency_3.google.protobuf.Timestamp) {
pb_1.Message.setWrapperField(this, 5, value);
}
get has_commit_time() {
return pb_1.Message.getField(this, 5) != null;
}
get commit_fee() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 6) as dependency_4.cosmos.base.v1beta1.Coin;
}
set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 6, value);
}
get has_commit_fee() {
return pb_1.Message.getField(this, 6) != null;
}
get reveal_time() {
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 7) as dependency_3.google.protobuf.Timestamp;
}
set reveal_time(value: dependency_3.google.protobuf.Timestamp) {
pb_1.Message.setWrapperField(this, 7, value);
}
get has_reveal_time() {
return pb_1.Message.getField(this, 7) != null;
}
get reveal_fee() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 8) as dependency_4.cosmos.base.v1beta1.Coin;
}
set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 8, value);
}
get has_reveal_fee() {
return pb_1.Message.getField(this, 8) != null;
}
get bid_amount() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9) as dependency_4.cosmos.base.v1beta1.Coin;
}
set bid_amount(value: dependency_4.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 9, value);
}
get has_bid_amount() {
return pb_1.Message.getField(this, 9) != null;
}
static fromObject(data: {
auction_id?: string;
bidder_address?: string;
status?: string;
commit_hash?: string;
commit_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
bid_amount?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
}): Bid {
const message = new Bid({});
if (data.auction_id != null) {
message.auction_id = data.auction_id;
}
if (data.bidder_address != null) {
message.bidder_address = data.bidder_address;
}
if (data.status != null) {
message.status = data.status;
}
if (data.commit_hash != null) {
message.commit_hash = data.commit_hash;
}
if (data.commit_time != null) {
message.commit_time = dependency_3.google.protobuf.Timestamp.fromObject(data.commit_time);
}
if (data.commit_fee != null) {
message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.commit_fee);
}
if (data.reveal_time != null) {
message.reveal_time = dependency_3.google.protobuf.Timestamp.fromObject(data.reveal_time);
}
if (data.reveal_fee != null) {
message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.reveal_fee);
}
if (data.bid_amount != null) {
message.bid_amount = dependency_4.cosmos.base.v1beta1.Coin.fromObject(data.bid_amount);
}
return message;
}
toObject() {
const data: {
auction_id?: string;
bidder_address?: string;
status?: string;
commit_hash?: string;
commit_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
reveal_time?: ReturnType<typeof dependency_3.google.protobuf.Timestamp.prototype.toObject>;
reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
bid_amount?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
} = {};
if (this.auction_id != null) {
data.auction_id = this.auction_id;
}
if (this.bidder_address != null) {
data.bidder_address = this.bidder_address;
}
if (this.status != null) {
data.status = this.status;
}
if (this.commit_hash != null) {
data.commit_hash = this.commit_hash;
}
if (this.commit_time != null) {
data.commit_time = this.commit_time.toObject();
}
if (this.commit_fee != null) {
data.commit_fee = this.commit_fee.toObject();
}
if (this.reveal_time != null) {
data.reveal_time = this.reveal_time.toObject();
}
if (this.reveal_fee != null) {
data.reveal_fee = this.reveal_fee.toObject();
}
if (this.bid_amount != null) {
data.bid_amount = this.bid_amount.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.auction_id.length)
writer.writeString(1, this.auction_id);
if (this.bidder_address.length)
writer.writeString(2, this.bidder_address);
if (this.status.length)
writer.writeString(3, this.status);
if (this.commit_hash.length)
writer.writeString(4, this.commit_hash);
if (this.has_commit_time)
writer.writeMessage(5, this.commit_time, () => this.commit_time.serialize(writer));
if (this.has_commit_fee)
writer.writeMessage(6, this.commit_fee, () => this.commit_fee.serialize(writer));
if (this.has_reveal_time)
writer.writeMessage(7, this.reveal_time, () => this.reveal_time.serialize(writer));
if (this.has_reveal_fee)
writer.writeMessage(8, this.reveal_fee, () => this.reveal_fee.serialize(writer));
if (this.has_bid_amount)
writer.writeMessage(9, this.bid_amount, () => this.bid_amount.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bid {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Bid();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.auction_id = reader.readString();
break;
case 2:
message.bidder_address = reader.readString();
break;
case 3:
message.status = reader.readString();
break;
case 4:
message.commit_hash = reader.readString();
break;
case 5:
reader.readMessage(message.commit_time, () => message.commit_time = dependency_3.google.protobuf.Timestamp.deserialize(reader));
break;
case 6:
reader.readMessage(message.commit_fee, () => message.commit_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 7:
reader.readMessage(message.reveal_time, () => message.reveal_time = dependency_3.google.protobuf.Timestamp.deserialize(reader));
break;
case 8:
reader.readMessage(message.reveal_fee, () => message.reveal_fee = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
case 9:
reader.readMessage(message.bid_amount, () => message.bid_amount = dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Bid {
return Bid.deserialize(bytes);
}
}
}

View File

@ -1,195 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/bond/v1beta1/bond.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.bond.v1beta1 {
export class Params extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
max_bond_amount?: dependency_2.cosmos.base.v1beta1.Coin;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("max_bond_amount" in data && data.max_bond_amount != undefined) {
this.max_bond_amount = data.max_bond_amount;
}
}
}
get max_bond_amount() {
return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 1) as dependency_2.cosmos.base.v1beta1.Coin;
}
set max_bond_amount(value: dependency_2.cosmos.base.v1beta1.Coin) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_max_bond_amount() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
max_bond_amount?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>;
}): Params {
const message = new Params({});
if (data.max_bond_amount != null) {
message.max_bond_amount = dependency_2.cosmos.base.v1beta1.Coin.fromObject(data.max_bond_amount);
}
return message;
}
toObject() {
const data: {
max_bond_amount?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>;
} = {};
if (this.max_bond_amount != null) {
data.max_bond_amount = this.max_bond_amount.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_max_bond_amount)
writer.writeMessage(1, this.max_bond_amount, () => this.max_bond_amount.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Params();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.max_bond_amount, () => message.max_bond_amount = dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Params {
return Params.deserialize(bytes);
}
}
export class Bond extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
owner?: string;
balance?: dependency_2.cosmos.base.v1beta1.Coin[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
if ("owner" in data && data.owner != undefined) {
this.owner = data.owner;
}
if ("balance" in data && data.balance != undefined) {
this.balance = data.balance;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get owner() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set owner(value: string) {
pb_1.Message.setField(this, 2, value);
}
get balance() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[];
}
set balance(value: dependency_2.cosmos.base.v1beta1.Coin[]) {
pb_1.Message.setRepeatedWrapperField(this, 3, value);
}
static fromObject(data: {
id?: string;
owner?: string;
balance?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
}): Bond {
const message = new Bond({});
if (data.id != null) {
message.id = data.id;
}
if (data.owner != null) {
message.owner = data.owner;
}
if (data.balance != null) {
message.balance = data.balance.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item));
}
return message;
}
toObject() {
const data: {
id?: string;
owner?: string;
balance?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
} = {};
if (this.id != null) {
data.id = this.id;
}
if (this.owner != null) {
data.owner = this.owner;
}
if (this.balance != null) {
data.balance = this.balance.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.owner.length)
writer.writeString(2, this.owner);
if (this.balance.length)
writer.writeRepeatedMessage(3, this.balance, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bond {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Bond();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
case 2:
message.owner = reader.readString();
break;
case 3:
reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Bond {
return Bond.deserialize(bytes);
}
}
}

View File

@ -1,105 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/bond/v1beta1/genesis.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./bond";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.bond.v1beta1 {
export class GenesisState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
params?: dependency_2.vulcanize.bond.v1beta1.Params;
bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("params" in data && data.params != undefined) {
this.params = data.params;
}
if ("bonds" in data && data.bonds != undefined) {
this.bonds = data.bonds;
}
}
}
get params() {
return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Params, 1) as dependency_2.vulcanize.bond.v1beta1.Params;
}
set params(value: dependency_2.vulcanize.bond.v1beta1.Params) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_params() {
return pb_1.Message.getField(this, 1) != null;
}
get bonds() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 2) as dependency_2.vulcanize.bond.v1beta1.Bond[];
}
set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
static fromObject(data: {
params?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Params.prototype.toObject>;
bonds?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>[];
}): GenesisState {
const message = new GenesisState({});
if (data.params != null) {
message.params = dependency_2.vulcanize.bond.v1beta1.Params.fromObject(data.params);
}
if (data.bonds != null) {
message.bonds = data.bonds.map(item => dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(item));
}
return message;
}
toObject() {
const data: {
params?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Params.prototype.toObject>;
bonds?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>[];
} = {};
if (this.params != null) {
data.params = this.params.toObject();
}
if (this.bonds != null) {
data.bonds = this.bonds.map((item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_params)
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
if (this.bonds.length)
writer.writeRepeatedMessage(2, this.bonds, (item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.bond.v1beta1.Params.deserialize(reader));
break;
case 2:
reader.readMessage(message.bonds, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader), dependency_2.vulcanize.bond.v1beta1.Bond));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): GenesisState {
return GenesisState.deserialize(bytes);
}
}
}

View File

@ -1,718 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/bond/v1beta1/query.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./bond";
import * as dependency_3 from "./../../../google/api/annotations";
import * as dependency_4 from "./../../../cosmos/base/query/v1beta1/pagination";
import * as dependency_5 from "./../../../cosmos/base/v1beta1/coin";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.bond.v1beta1 {
export class QueryParamsRequest extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): QueryParamsRequest {
const message = new QueryParamsRequest({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsRequest();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryParamsRequest {
return QueryParamsRequest.deserialize(bytes);
}
}
export class QueryParamsResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
params?: dependency_2.vulcanize.bond.v1beta1.Params;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("params" in data && data.params != undefined) {
this.params = data.params;
}
}
}
get params() {
return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Params, 1) as dependency_2.vulcanize.bond.v1beta1.Params;
}
set params(value: dependency_2.vulcanize.bond.v1beta1.Params) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_params() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
params?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Params.prototype.toObject>;
}): QueryParamsResponse {
const message = new QueryParamsResponse({});
if (data.params != null) {
message.params = dependency_2.vulcanize.bond.v1beta1.Params.fromObject(data.params);
}
return message;
}
toObject() {
const data: {
params?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Params.prototype.toObject>;
} = {};
if (this.params != null) {
data.params = this.params.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_params)
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryParamsResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.bond.v1beta1.Params.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryParamsResponse {
return QueryParamsResponse.deserialize(bytes);
}
}
export class QueryGetBondsRequest extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("pagination" in data && data.pagination != undefined) {
this.pagination = data.pagination;
}
}
}
get pagination() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_4.cosmos.base.query.v1beta1.PageRequest;
}
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_pagination() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
}): QueryGetBondsRequest {
const message = new QueryGetBondsRequest({});
if (data.pagination != null) {
message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
}
return message;
}
toObject() {
const data: {
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
} = {};
if (this.pagination != null) {
data.pagination = this.pagination.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_pagination)
writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsRequest {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsRequest();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondsRequest {
return QueryGetBondsRequest.deserialize(bytes);
}
}
export class QueryGetBondsResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[];
pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("bonds" in data && data.bonds != undefined) {
this.bonds = data.bonds;
}
if ("pagination" in data && data.pagination != undefined) {
this.pagination = data.pagination;
}
}
}
get bonds() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 1) as dependency_2.vulcanize.bond.v1beta1.Bond[];
}
set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]) {
pb_1.Message.setRepeatedWrapperField(this, 1, value);
}
get pagination() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse;
}
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_pagination() {
return pb_1.Message.getField(this, 2) != null;
}
static fromObject(data: {
bonds?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>[];
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
}): QueryGetBondsResponse {
const message = new QueryGetBondsResponse({});
if (data.bonds != null) {
message.bonds = data.bonds.map(item => dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(item));
}
if (data.pagination != null) {
message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
}
return message;
}
toObject() {
const data: {
bonds?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>[];
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
} = {};
if (this.bonds != null) {
data.bonds = this.bonds.map((item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.toObject());
}
if (this.pagination != null) {
data.pagination = this.pagination.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.bonds.length)
writer.writeRepeatedMessage(1, this.bonds, (item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.serialize(writer));
if (this.has_pagination)
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.bonds, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader), dependency_2.vulcanize.bond.v1beta1.Bond));
break;
case 2:
reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondsResponse {
return QueryGetBondsResponse.deserialize(bytes);
}
}
export class QueryGetBondByIdRequest extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
id?: string;
}): QueryGetBondByIdRequest {
const message = new QueryGetBondByIdRequest({});
if (data.id != null) {
message.id = data.id;
}
return message;
}
toObject() {
const data: {
id?: string;
} = {};
if (this.id != null) {
data.id = this.id;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondByIdRequest {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondByIdRequest();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondByIdRequest {
return QueryGetBondByIdRequest.deserialize(bytes);
}
}
export class QueryGetBondByIdResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
bond?: dependency_2.vulcanize.bond.v1beta1.Bond;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("bond" in data && data.bond != undefined) {
this.bond = data.bond;
}
}
}
get bond() {
return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 1) as dependency_2.vulcanize.bond.v1beta1.Bond;
}
set bond(value: dependency_2.vulcanize.bond.v1beta1.Bond) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_bond() {
return pb_1.Message.getField(this, 1) != null;
}
static fromObject(data: {
bond?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>;
}): QueryGetBondByIdResponse {
const message = new QueryGetBondByIdResponse({});
if (data.bond != null) {
message.bond = dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(data.bond);
}
return message;
}
toObject() {
const data: {
bond?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>;
} = {};
if (this.bond != null) {
data.bond = this.bond.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_bond)
writer.writeMessage(1, this.bond, () => this.bond.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondByIdResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondByIdResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.bond, () => message.bond = dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondByIdResponse {
return QueryGetBondByIdResponse.deserialize(bytes);
}
}
export class QueryGetBondsByOwnerRequest extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
owner?: string;
pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("owner" in data && data.owner != undefined) {
this.owner = data.owner;
}
if ("pagination" in data && data.pagination != undefined) {
this.pagination = data.pagination;
}
}
}
get owner() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set owner(value: string) {
pb_1.Message.setField(this, 1, value);
}
get pagination() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse;
}
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_pagination() {
return pb_1.Message.getField(this, 2) != null;
}
static fromObject(data: {
owner?: string;
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
}): QueryGetBondsByOwnerRequest {
const message = new QueryGetBondsByOwnerRequest({});
if (data.owner != null) {
message.owner = data.owner;
}
if (data.pagination != null) {
message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
}
return message;
}
toObject() {
const data: {
owner?: string;
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
} = {};
if (this.owner != null) {
data.owner = this.owner;
}
if (this.pagination != null) {
data.pagination = this.pagination.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.owner.length)
writer.writeString(1, this.owner);
if (this.has_pagination)
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsByOwnerRequest {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsByOwnerRequest();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.owner = reader.readString();
break;
case 2:
reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondsByOwnerRequest {
return QueryGetBondsByOwnerRequest.deserialize(bytes);
}
}
export class QueryGetBondsByOwnerResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[];
pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("bonds" in data && data.bonds != undefined) {
this.bonds = data.bonds;
}
if ("pagination" in data && data.pagination != undefined) {
this.pagination = data.pagination;
}
}
}
get bonds() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 1) as dependency_2.vulcanize.bond.v1beta1.Bond[];
}
set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]) {
pb_1.Message.setRepeatedWrapperField(this, 1, value);
}
get pagination() {
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_4.cosmos.base.query.v1beta1.PageResponse;
}
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_pagination() {
return pb_1.Message.getField(this, 2) != null;
}
static fromObject(data: {
bonds?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>[];
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
}): QueryGetBondsByOwnerResponse {
const message = new QueryGetBondsByOwnerResponse({});
if (data.bonds != null) {
message.bonds = data.bonds.map(item => dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(item));
}
if (data.pagination != null) {
message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination);
}
return message;
}
toObject() {
const data: {
bonds?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>[];
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
} = {};
if (this.bonds != null) {
data.bonds = this.bonds.map((item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.toObject());
}
if (this.pagination != null) {
data.pagination = this.pagination.toObject();
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.bonds.length)
writer.writeRepeatedMessage(1, this.bonds, (item: dependency_2.vulcanize.bond.v1beta1.Bond) => item.serialize(writer));
if (this.has_pagination)
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsByOwnerResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondsByOwnerResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.bonds, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_2.vulcanize.bond.v1beta1.Bond.deserialize(reader), dependency_2.vulcanize.bond.v1beta1.Bond));
break;
case 2:
reader.readMessage(message.pagination, () => message.pagination = dependency_4.cosmos.base.query.v1beta1.PageResponse.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondsByOwnerResponse {
return QueryGetBondsByOwnerResponse.deserialize(bytes);
}
}
export class QueryGetBondModuleBalanceRequest extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): QueryGetBondModuleBalanceRequest {
const message = new QueryGetBondModuleBalanceRequest({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondModuleBalanceRequest {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondModuleBalanceRequest();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondModuleBalanceRequest {
return QueryGetBondModuleBalanceRequest.deserialize(bytes);
}
}
export class QueryGetBondModuleBalanceResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
balance?: dependency_5.cosmos.base.v1beta1.Coin[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("balance" in data && data.balance != undefined) {
this.balance = data.balance;
}
}
}
get balance() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_5.cosmos.base.v1beta1.Coin, 2) as dependency_5.cosmos.base.v1beta1.Coin[];
}
set balance(value: dependency_5.cosmos.base.v1beta1.Coin[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
static fromObject(data: {
balance?: ReturnType<typeof dependency_5.cosmos.base.v1beta1.Coin.prototype.toObject>[];
}): QueryGetBondModuleBalanceResponse {
const message = new QueryGetBondModuleBalanceResponse({});
if (data.balance != null) {
message.balance = data.balance.map(item => dependency_5.cosmos.base.v1beta1.Coin.fromObject(item));
}
return message;
}
toObject() {
const data: {
balance?: ReturnType<typeof dependency_5.cosmos.base.v1beta1.Coin.prototype.toObject>[];
} = {};
if (this.balance != null) {
data.balance = this.balance.map((item: dependency_5.cosmos.base.v1beta1.Coin) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.balance.length)
writer.writeRepeatedMessage(2, this.balance, (item: dependency_5.cosmos.base.v1beta1.Coin) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondModuleBalanceResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryGetBondModuleBalanceResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 2:
reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_5.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_5.cosmos.base.v1beta1.Coin));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): QueryGetBondModuleBalanceResponse {
return QueryGetBondModuleBalanceResponse.deserialize(bytes);
}
}
}

View File

@ -1,605 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/bond/v1beta1/tx.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.bond.v1beta1 {
export class MsgCreateBond extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
signer?: string;
coins?: dependency_2.cosmos.base.v1beta1.Coin[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
if ("coins" in data && data.coins != undefined) {
this.coins = data.coins;
}
}
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 1, value);
}
get coins() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 2) as dependency_2.cosmos.base.v1beta1.Coin[];
}
set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
static fromObject(data: {
signer?: string;
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
}): MsgCreateBond {
const message = new MsgCreateBond({});
if (data.signer != null) {
message.signer = data.signer;
}
if (data.coins != null) {
message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item));
}
return message;
}
toObject() {
const data: {
signer?: string;
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
} = {};
if (this.signer != null) {
data.signer = this.signer;
}
if (this.coins != null) {
data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.signer.length)
writer.writeString(1, this.signer);
if (this.coins.length)
writer.writeRepeatedMessage(2, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateBond {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateBond();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.signer = reader.readString();
break;
case 2:
reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCreateBond {
return MsgCreateBond.deserialize(bytes);
}
}
export class MsgCreateBondResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
id?: string;
}): MsgCreateBondResponse {
const message = new MsgCreateBondResponse({});
if (data.id != null) {
message.id = data.id;
}
return message;
}
toObject() {
const data: {
id?: string;
} = {};
if (this.id != null) {
data.id = this.id;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateBondResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCreateBondResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCreateBondResponse {
return MsgCreateBondResponse.deserialize(bytes);
}
}
export class MsgRefillBond extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
signer?: string;
coins?: dependency_2.cosmos.base.v1beta1.Coin[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
if ("coins" in data && data.coins != undefined) {
this.coins = data.coins;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 2, value);
}
get coins() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[];
}
set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) {
pb_1.Message.setRepeatedWrapperField(this, 3, value);
}
static fromObject(data: {
id?: string;
signer?: string;
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
}): MsgRefillBond {
const message = new MsgRefillBond({});
if (data.id != null) {
message.id = data.id;
}
if (data.signer != null) {
message.signer = data.signer;
}
if (data.coins != null) {
message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item));
}
return message;
}
toObject() {
const data: {
id?: string;
signer?: string;
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
} = {};
if (this.id != null) {
data.id = this.id;
}
if (this.signer != null) {
data.signer = this.signer;
}
if (this.coins != null) {
data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.signer.length)
writer.writeString(2, this.signer);
if (this.coins.length)
writer.writeRepeatedMessage(3, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRefillBond {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRefillBond();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
case 2:
message.signer = reader.readString();
break;
case 3:
reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgRefillBond {
return MsgRefillBond.deserialize(bytes);
}
}
export class MsgRefillBondResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): MsgRefillBondResponse {
const message = new MsgRefillBondResponse({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRefillBondResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgRefillBondResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgRefillBondResponse {
return MsgRefillBondResponse.deserialize(bytes);
}
}
export class MsgWithdrawBond extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
signer?: string;
coins?: dependency_2.cosmos.base.v1beta1.Coin[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
if ("coins" in data && data.coins != undefined) {
this.coins = data.coins;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 2, value);
}
get coins() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3) as dependency_2.cosmos.base.v1beta1.Coin[];
}
set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]) {
pb_1.Message.setRepeatedWrapperField(this, 3, value);
}
static fromObject(data: {
id?: string;
signer?: string;
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
}): MsgWithdrawBond {
const message = new MsgWithdrawBond({});
if (data.id != null) {
message.id = data.id;
}
if (data.signer != null) {
message.signer = data.signer;
}
if (data.coins != null) {
message.coins = data.coins.map(item => dependency_2.cosmos.base.v1beta1.Coin.fromObject(item));
}
return message;
}
toObject() {
const data: {
id?: string;
signer?: string;
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
} = {};
if (this.id != null) {
data.id = this.id;
}
if (this.signer != null) {
data.signer = this.signer;
}
if (this.coins != null) {
data.coins = this.coins.map((item: dependency_2.cosmos.base.v1beta1.Coin) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.signer.length)
writer.writeString(2, this.signer);
if (this.coins.length)
writer.writeRepeatedMessage(3, this.coins, (item: dependency_2.cosmos.base.v1beta1.Coin) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawBond {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawBond();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
case 2:
message.signer = reader.readString();
break;
case 3:
reader.readMessage(message.coins, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_2.cosmos.base.v1beta1.Coin));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgWithdrawBond {
return MsgWithdrawBond.deserialize(bytes);
}
}
export class MsgWithdrawBondResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): MsgWithdrawBondResponse {
const message = new MsgWithdrawBondResponse({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawBondResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgWithdrawBondResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgWithdrawBondResponse {
return MsgWithdrawBondResponse.deserialize(bytes);
}
}
export class MsgCancelBond extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
signer?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
}
if ("signer" in data && data.signer != undefined) {
this.signer = data.signer;
}
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set id(value: string) {
pb_1.Message.setField(this, 1, value);
}
get signer() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set signer(value: string) {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
id?: string;
signer?: string;
}): MsgCancelBond {
const message = new MsgCancelBond({});
if (data.id != null) {
message.id = data.id;
}
if (data.signer != null) {
message.signer = data.signer;
}
return message;
}
toObject() {
const data: {
id?: string;
signer?: string;
} = {};
if (this.id != null) {
data.id = this.id;
}
if (this.signer != null) {
data.signer = this.signer;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.signer.length)
writer.writeString(2, this.signer);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelBond {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelBond();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
break;
case 2:
message.signer = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCancelBond {
return MsgCancelBond.deserialize(bytes);
}
}
export class MsgCancelBondResponse extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): MsgCancelBondResponse {
const message = new MsgCancelBondResponse({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelBondResponse {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgCancelBondResponse();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgCancelBondResponse {
return MsgCancelBondResponse.deserialize(bytes);
}
}
}

View File

@ -1,151 +0,0 @@
// @ts-nocheck
/* eslint-disable */
/**
* Generated by the protoc-gen-ts. DO NOT EDIT!
* compiler version: 4.25.1
* source: vulcanize/registry/v1beta1/genesis.proto
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../gogoproto/gogo";
import * as dependency_2 from "./registry";
import * as pb_1 from "google-protobuf";
export namespace vulcanize.registry.v1beta1 {
export class GenesisState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
params?: dependency_2.vulcanize.registry.v1beta1.Params;
records?: dependency_2.vulcanize.registry.v1beta1.Record[];
authorities?: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry[];
names?: dependency_2.vulcanize.registry.v1beta1.NameEntry[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("params" in data && data.params != undefined) {
this.params = data.params;
}
if ("records" in data && data.records != undefined) {
this.records = data.records;
}
if ("authorities" in data && data.authorities != undefined) {
this.authorities = data.authorities;
}
if ("names" in data && data.names != undefined) {
this.names = data.names;
}
}
}
get params() {
return pb_1.Message.getWrapperField(this, dependency_2.vulcanize.registry.v1beta1.Params, 1) as dependency_2.vulcanize.registry.v1beta1.Params;
}
set params(value: dependency_2.vulcanize.registry.v1beta1.Params) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_params() {
return pb_1.Message.getField(this, 1) != null;
}
get records() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.Record, 2) as dependency_2.vulcanize.registry.v1beta1.Record[];
}
set records(value: dependency_2.vulcanize.registry.v1beta1.Record[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
get authorities() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.AuthorityEntry, 3) as dependency_2.vulcanize.registry.v1beta1.AuthorityEntry[];
}
set authorities(value: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry[]) {
pb_1.Message.setRepeatedWrapperField(this, 3, value);
}
get names() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.registry.v1beta1.NameEntry, 4) as dependency_2.vulcanize.registry.v1beta1.NameEntry[];
}
set names(value: dependency_2.vulcanize.registry.v1beta1.NameEntry[]) {
pb_1.Message.setRepeatedWrapperField(this, 4, value);
}
static fromObject(data: {
params?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.Params.prototype.toObject>;
records?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.Record.prototype.toObject>[];
authorities?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.AuthorityEntry.prototype.toObject>[];
names?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.NameEntry.prototype.toObject>[];
}): GenesisState {
const message = new GenesisState({});
if (data.params != null) {
message.params = dependency_2.vulcanize.registry.v1beta1.Params.fromObject(data.params);
}
if (data.records != null) {
message.records = data.records.map(item => dependency_2.vulcanize.registry.v1beta1.Record.fromObject(item));
}
if (data.authorities != null) {
message.authorities = data.authorities.map(item => dependency_2.vulcanize.registry.v1beta1.AuthorityEntry.fromObject(item));
}
if (data.names != null) {
message.names = data.names.map(item => dependency_2.vulcanize.registry.v1beta1.NameEntry.fromObject(item));
}
return message;
}
toObject() {
const data: {
params?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.Params.prototype.toObject>;
records?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.Record.prototype.toObject>[];
authorities?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.AuthorityEntry.prototype.toObject>[];
names?: ReturnType<typeof dependency_2.vulcanize.registry.v1beta1.NameEntry.prototype.toObject>[];
} = {};
if (this.params != null) {
data.params = this.params.toObject();
}
if (this.records != null) {
data.records = this.records.map((item: dependency_2.vulcanize.registry.v1beta1.Record) => item.toObject());
}
if (this.authorities != null) {
data.authorities = this.authorities.map((item: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry) => item.toObject());
}
if (this.names != null) {
data.names = this.names.map((item: dependency_2.vulcanize.registry.v1beta1.NameEntry) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_params)
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
if (this.records.length)
writer.writeRepeatedMessage(2, this.records, (item: dependency_2.vulcanize.registry.v1beta1.Record) => item.serialize(writer));
if (this.authorities.length)
writer.writeRepeatedMessage(3, this.authorities, (item: dependency_2.vulcanize.registry.v1beta1.AuthorityEntry) => item.serialize(writer));
if (this.names.length)
writer.writeRepeatedMessage(4, this.names, (item: dependency_2.vulcanize.registry.v1beta1.NameEntry) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GenesisState();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.params, () => message.params = dependency_2.vulcanize.registry.v1beta1.Params.deserialize(reader));
break;
case 2:
reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.registry.v1beta1.Record.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.Record));
break;
case 3:
reader.readMessage(message.authorities, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.vulcanize.registry.v1beta1.AuthorityEntry.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.AuthorityEntry));
break;
case 4:
reader.readMessage(message.names, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.vulcanize.registry.v1beta1.NameEntry.deserialize(reader), dependency_2.vulcanize.registry.v1beta1.NameEntry));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): GenesisState {
return GenesisState.deserialize(bytes);
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,322 +0,0 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "cosmos.base.query.v1beta1";
/**
* PageRequest is to be embedded in gRPC request messages for efficient
* pagination. Ex:
*
* message SomeRequest {
* Foo some_parameter = 1;
* PageRequest pagination = 2;
* }
*/
export interface PageRequest {
/**
* key is a value returned in PageResponse.next_key to begin
* querying the next page most efficiently. Only one of offset or key
* should be set.
*/
key: Uint8Array;
/**
* offset is a numeric offset that can be used when key is unavailable.
* It is less efficient than using key. Only one of offset or key should
* be set.
*/
offset: Long;
/**
* limit is the total number of results to be returned in the result page.
* If left empty it will default to a value to be set by each app.
*/
limit: Long;
/**
* count_total is set to true to indicate that the result set should include
* a count of the total number of items available for pagination in UIs.
* count_total is only respected when offset is used. It is ignored when key
* is set.
*/
countTotal: boolean;
/**
* reverse is set to true if results are to be returned in the descending order.
*
* Since: cosmos-sdk 0.43
*/
reverse: boolean;
}
/**
* PageResponse is to be embedded in gRPC response messages where the
* corresponding request message has used PageRequest.
*
* message SomeResponse {
* repeated Bar results = 1;
* PageResponse page = 2;
* }
*/
export interface PageResponse {
/**
* next_key is the key to be passed to PageRequest.key to
* query the next page most efficiently. It will be empty if
* there are no more results.
*/
nextKey: Uint8Array;
/**
* total is total number of results available if PageRequest.count_total
* was set, its value is undefined otherwise
*/
total: Long;
}
function createBasePageRequest(): PageRequest {
return {
key: new Uint8Array(),
offset: Long.UZERO,
limit: Long.UZERO,
countTotal: false,
reverse: false,
};
}
export const PageRequest = {
encode(
message: PageRequest,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.key.length !== 0) {
writer.uint32(10).bytes(message.key);
}
if (!message.offset.isZero()) {
writer.uint32(16).uint64(message.offset);
}
if (!message.limit.isZero()) {
writer.uint32(24).uint64(message.limit);
}
if (message.countTotal === true) {
writer.uint32(32).bool(message.countTotal);
}
if (message.reverse === true) {
writer.uint32(40).bool(message.reverse);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): PageRequest {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBasePageRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.key = reader.bytes();
break;
case 2:
message.offset = reader.uint64() as Long;
break;
case 3:
message.limit = reader.uint64() as Long;
break;
case 4:
message.countTotal = reader.bool();
break;
case 5:
message.reverse = reader.bool();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): PageRequest {
return {
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
offset: isSet(object.offset) ? Long.fromValue(object.offset) : Long.UZERO,
limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO,
countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false,
reverse: isSet(object.reverse) ? Boolean(object.reverse) : false,
};
},
toJSON(message: PageRequest): unknown {
const obj: any = {};
message.key !== undefined &&
(obj.key = base64FromBytes(
message.key !== undefined ? message.key : new Uint8Array()
));
message.offset !== undefined &&
(obj.offset = (message.offset || Long.UZERO).toString());
message.limit !== undefined &&
(obj.limit = (message.limit || Long.UZERO).toString());
message.countTotal !== undefined && (obj.countTotal = message.countTotal);
message.reverse !== undefined && (obj.reverse = message.reverse);
return obj;
},
fromPartial<I extends Exact<DeepPartial<PageRequest>, I>>(
object: I
): PageRequest {
const message = createBasePageRequest();
message.key = object.key ?? new Uint8Array();
message.offset =
object.offset !== undefined && object.offset !== null
? Long.fromValue(object.offset)
: Long.UZERO;
message.limit =
object.limit !== undefined && object.limit !== null
? Long.fromValue(object.limit)
: Long.UZERO;
message.countTotal = object.countTotal ?? false;
message.reverse = object.reverse ?? false;
return message;
},
};
function createBasePageResponse(): PageResponse {
return { nextKey: new Uint8Array(), total: Long.UZERO };
}
export const PageResponse = {
encode(
message: PageResponse,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.nextKey.length !== 0) {
writer.uint32(10).bytes(message.nextKey);
}
if (!message.total.isZero()) {
writer.uint32(16).uint64(message.total);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): PageResponse {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBasePageResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.nextKey = reader.bytes();
break;
case 2:
message.total = reader.uint64() as Long;
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): PageResponse {
return {
nextKey: isSet(object.nextKey)
? bytesFromBase64(object.nextKey)
: new Uint8Array(),
total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO,
};
},
toJSON(message: PageResponse): unknown {
const obj: any = {};
message.nextKey !== undefined &&
(obj.nextKey = base64FromBytes(
message.nextKey !== undefined ? message.nextKey : new Uint8Array()
));
message.total !== undefined &&
(obj.total = (message.total || Long.UZERO).toString());
return obj;
},
fromPartial<I extends Exact<DeepPartial<PageResponse>, I>>(
object: I
): PageResponse {
const message = createBasePageResponse();
message.nextKey = object.nextKey ?? new Uint8Array();
message.total =
object.total !== undefined && object.total !== null
? Long.fromValue(object.total)
: Long.UZERO;
return message;
},
};
declare var self: any | undefined;
declare var window: any | undefined;
declare var global: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw "Unable to locate global object";
})();
function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
}
return arr;
}
}
function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
bin.push(String.fromCharCode(byte));
});
return globalThis.btoa(bin.join(""));
}
}
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}

View File

@ -1,303 +0,0 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "cosmos.base.v1beta1";
/**
* Coin defines a token with a denomination and an amount.
*
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
*/
export interface Coin {
denom: string;
amount: string;
}
/**
* DecCoin defines a token with a denomination and a decimal amount.
*
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
*/
export interface DecCoin {
denom: string;
amount: string;
}
/**
* IntProto defines a Protobuf wrapper around an Int object.
* Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
*/
export interface IntProto {
int: string;
}
/**
* DecProto defines a Protobuf wrapper around a Dec object.
* Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
*/
export interface DecProto {
dec: string;
}
function createBaseCoin(): Coin {
return { denom: "", amount: "" };
}
export const Coin = {
encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
if (message.amount !== "") {
writer.uint32(18).string(message.amount);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Coin {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCoin();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.denom = reader.string();
break;
case 2:
message.amount = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Coin {
return {
denom: isSet(object.denom) ? String(object.denom) : "",
amount: isSet(object.amount) ? String(object.amount) : "",
};
},
toJSON(message: Coin): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
message.amount !== undefined && (obj.amount = message.amount);
return obj;
},
fromPartial<I extends Exact<DeepPartial<Coin>, I>>(object: I): Coin {
const message = createBaseCoin();
message.denom = object.denom ?? "";
message.amount = object.amount ?? "";
return message;
},
};
function createBaseDecCoin(): DecCoin {
return { denom: "", amount: "" };
}
export const DecCoin = {
encode(
message: DecCoin,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
if (message.amount !== "") {
writer.uint32(18).string(message.amount);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDecCoin();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.denom = reader.string();
break;
case 2:
message.amount = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): DecCoin {
return {
denom: isSet(object.denom) ? String(object.denom) : "",
amount: isSet(object.amount) ? String(object.amount) : "",
};
},
toJSON(message: DecCoin): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
message.amount !== undefined && (obj.amount = message.amount);
return obj;
},
fromPartial<I extends Exact<DeepPartial<DecCoin>, I>>(object: I): DecCoin {
const message = createBaseDecCoin();
message.denom = object.denom ?? "";
message.amount = object.amount ?? "";
return message;
},
};
function createBaseIntProto(): IntProto {
return { int: "" };
}
export const IntProto = {
encode(
message: IntProto,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.int !== "") {
writer.uint32(10).string(message.int);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): IntProto {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseIntProto();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.int = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): IntProto {
return {
int: isSet(object.int) ? String(object.int) : "",
};
},
toJSON(message: IntProto): unknown {
const obj: any = {};
message.int !== undefined && (obj.int = message.int);
return obj;
},
fromPartial<I extends Exact<DeepPartial<IntProto>, I>>(object: I): IntProto {
const message = createBaseIntProto();
message.int = object.int ?? "";
return message;
},
};
function createBaseDecProto(): DecProto {
return { dec: "" };
}
export const DecProto = {
encode(
message: DecProto,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.dec !== "") {
writer.uint32(10).string(message.dec);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): DecProto {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDecProto();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.dec = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): DecProto {
return {
dec: isSet(object.dec) ? String(object.dec) : "",
};
},
toJSON(message: DecProto): unknown {
const obj: any = {};
message.dec !== undefined && (obj.dec = message.dec);
return obj;
},
fromPartial<I extends Exact<DeepPartial<DecProto>, I>>(object: I): DecProto {
const message = createBaseDecProto();
message.dec = object.dec ?? "";
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}

View File

@ -1,2 +0,0 @@
/* eslint-disable */
export const protobufPackage = "gogoproto";

View File

@ -1,2 +0,0 @@
/* eslint-disable */
export const protobufPackage = "google.api";

View File

@ -1,647 +0,0 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.api";
/**
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
*/
export interface Http {
/**
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*/
rules: HttpRule[];
/**
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*/
fullyDecodeReservedExpansion: boolean;
}
/**
* `HttpRule` defines the mapping of an RPC method to one or more HTTP
* REST API methods. The mapping specifies how different portions of the RPC
* request message are mapped to URL path, URL query parameters, and
* HTTP request body. The mapping is typically specified as an
* `google.api.http` annotation on the RPC method,
* see "google/api/annotations.proto" for details.
*
* The mapping consists of a field specifying the path template and
* method kind. The path template can refer to fields in the request
* message, as in the example below which describes a REST GET
* operation on a resource collection of messages:
*
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http).get =
* "/v1/messages/{message_id}/{sub.subfield}";
* }
* }
* message GetMessageRequest {
* message SubMessage {
* string subfield = 1;
* }
* string message_id = 1; // mapped to the URL
* SubMessage sub = 2; // `sub.subfield` is url-mapped
* }
* message Message {
* string text = 1; // content of the resource
* }
*
* The same http annotation can alternatively be expressed inside the
* `GRPC API Configuration` YAML file.
*
* http:
* rules:
* - selector: <proto_package_name>.Messaging.GetMessage
* get: /v1/messages/{message_id}/{sub.subfield}
*
* This definition enables an automatic, bidrectional mapping of HTTP
* JSON to RPC. Example:
*
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub:
* SubMessage(subfield: "foo"))`
*
* In general, not only fields but also field paths can be referenced
* from a path pattern. Fields mapped to the path pattern cannot be
* repeated and must have a primitive (non-message) type.
*
* Any fields in the request message which are not bound by the path
* pattern automatically become (optional) HTTP query
* parameters. Assume the following definition of the request message:
*
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http).get = "/v1/messages/{message_id}";
* }
* }
* message GetMessageRequest {
* message SubMessage {
* string subfield = 1;
* }
* string message_id = 1; // mapped to the URL
* int64 revision = 2; // becomes a parameter
* SubMessage sub = 3; // `sub.subfield` becomes a parameter
* }
*
*
* This enables a HTTP JSON to RPC mapping as below:
*
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
* `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
* "foo"))`
*
* Note that fields which are mapped to HTTP parameters must have a
* primitive type or a repeated primitive type. Message types are not
* allowed. In the case of a repeated type, the parameter can be
* repeated in the URL, as in `...?param=A&param=B`.
*
* For HTTP method kinds which allow a request body, the `body` field
* specifies the mapping. Consider a REST update method on the
* message resource collection:
*
*
* service Messaging {
* rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
* option (google.api.http) = {
* put: "/v1/messages/{message_id}"
* body: "message"
* };
* }
* }
* message UpdateMessageRequest {
* string message_id = 1; // mapped to the URL
* Message message = 2; // mapped to the body
* }
*
*
* The following HTTP JSON to RPC mapping is enabled, where the
* representation of the JSON in the request body is determined by
* protos JSON encoding:
*
* HTTP | RPC
* -----|-----
* `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" message { text: "Hi!" })`
*
* The special name `*` can be used in the body mapping to define that
* every field not bound by the path template should be mapped to the
* request body. This enables the following alternative definition of
* the update method:
*
* service Messaging {
* rpc UpdateMessage(Message) returns (Message) {
* option (google.api.http) = {
* put: "/v1/messages/{message_id}"
* body: "*"
* };
* }
* }
* message Message {
* string message_id = 1;
* string text = 2;
* }
*
*
* The following HTTP JSON to RPC mapping is enabled:
*
* HTTP | RPC
* -----|-----
* `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" text: "Hi!")`
*
* Note that when using `*` in the body mapping, it is not possible to
* have HTTP parameters, as all fields not bound by the path end in
* the body. This makes this option more rarely used in practice of
* defining REST APIs. The common usage of `*` is in custom methods
* which don't use the URL at all for transferring data.
*
* It is possible to define multiple HTTP methods for one RPC by using
* the `additional_bindings` option. Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/messages/{message_id}"
* additional_bindings {
* get: "/v1/users/{user_id}/messages/{message_id}"
* }
* };
* }
* }
* message GetMessageRequest {
* string message_id = 1;
* string user_id = 2;
* }
*
*
* This enables the following two alternative HTTP JSON to RPC
* mappings:
*
* HTTP | RPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
* "123456")`
*
* # Rules for HTTP mapping
*
* The rules for mapping HTTP path, query parameters, and body fields
* to the request message are as follows:
*
* 1. The `body` field specifies either `*` or a field path, or is
* omitted. If omitted, it indicates there is no HTTP request body.
* 2. Leaf fields (recursive expansion of nested messages in the
* request) can be classified into three types:
* (a) Matched in the URL template.
* (b) Covered by body (if body is `*`, everything except (a) fields;
* else everything under the body field)
* (c) All other fields.
* 3. URL query parameters found in the HTTP request are mapped to (c) fields.
* 4. Any body sent with an HTTP request can contain only (b) fields.
*
* The syntax of the path template is as follows:
*
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
* Segment = "*" | "**" | LITERAL | Variable ;
* Variable = "{" FieldPath [ "=" Segments ] "}" ;
* FieldPath = IDENT { "." IDENT } ;
* Verb = ":" LITERAL ;
*
* The syntax `*` matches a single path segment. The syntax `**` matches zero
* or more path segments, which must be the last part of the path except the
* `Verb`. The syntax `LITERAL` matches literal text in the path.
*
* The syntax `Variable` matches part of the URL path as specified by its
* template. A variable template must not contain other variables. If a variable
* matches a single path segment, its template may be omitted, e.g. `{var}`
* is equivalent to `{var=*}`.
*
* If a variable contains exactly one path segment, such as `"{var}"` or
* `"{var=*}"`, when such a variable is expanded into a URL path, all characters
* except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
* Discovery Document as `{var}`.
*
* If a variable contains one or more path segments, such as `"{var=foo/*}"`
* or `"{var=**}"`, when such a variable is expanded into a URL path, all
* characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
* show up in the Discovery Document as `{+var}`.
*
* NOTE: While the single segment variable matches the semantics of
* [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
* Simple String Expansion, the multi segment variable **does not** match
* RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
* does not expand special characters like `?` and `#`, which would lead
* to invalid URLs.
*
* NOTE: the field paths in variables and in the `body` must not refer to
* repeated fields or map fields.
*/
export interface HttpRule {
/**
* Selects methods to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
*/
selector: string;
/** Used for listing and getting information about resources. */
get: string | undefined;
/** Used for updating a resource. */
put: string | undefined;
/** Used for creating a resource. */
post: string | undefined;
/** Used for deleting a resource. */
delete: string | undefined;
/** Used for updating a resource. */
patch: string | undefined;
/**
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
*/
custom?: CustomHttpPattern | undefined;
/**
* The name of the request field whose value is mapped to the HTTP body, or
* `*` for mapping all fields not captured by the path pattern to the HTTP
* body. NOTE: the referred field must not be a repeated field and must be
* present at the top-level of request message type.
*/
body: string;
/**
* Optional. The name of the response field whose value is mapped to the HTTP
* body of response. Other response fields are ignored. When
* not set, the response message will be used as HTTP body of response.
*/
responseBody: string;
/**
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
*/
additionalBindings: HttpRule[];
}
/** A custom pattern is used for defining custom HTTP verb. */
export interface CustomHttpPattern {
/** The name of this custom HTTP verb. */
kind: string;
/** The path matched by this custom verb. */
path: string;
}
function createBaseHttp(): Http {
return { rules: [], fullyDecodeReservedExpansion: false };
}
export const Http = {
encode(message: Http, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
for (const v of message.rules) {
HttpRule.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.fullyDecodeReservedExpansion === true) {
writer.uint32(16).bool(message.fullyDecodeReservedExpansion);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Http {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseHttp();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.rules.push(HttpRule.decode(reader, reader.uint32()));
break;
case 2:
message.fullyDecodeReservedExpansion = reader.bool();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Http {
return {
rules: Array.isArray(object?.rules)
? object.rules.map((e: any) => HttpRule.fromJSON(e))
: [],
fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion)
? Boolean(object.fullyDecodeReservedExpansion)
: false,
};
},
toJSON(message: Http): unknown {
const obj: any = {};
if (message.rules) {
obj.rules = message.rules.map((e) =>
e ? HttpRule.toJSON(e) : undefined
);
} else {
obj.rules = [];
}
message.fullyDecodeReservedExpansion !== undefined &&
(obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion);
return obj;
},
fromPartial<I extends Exact<DeepPartial<Http>, I>>(object: I): Http {
const message = createBaseHttp();
message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || [];
message.fullyDecodeReservedExpansion =
object.fullyDecodeReservedExpansion ?? false;
return message;
},
};
function createBaseHttpRule(): HttpRule {
return {
selector: "",
get: undefined,
put: undefined,
post: undefined,
delete: undefined,
patch: undefined,
custom: undefined,
body: "",
responseBody: "",
additionalBindings: [],
};
}
export const HttpRule = {
encode(
message: HttpRule,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.selector !== "") {
writer.uint32(10).string(message.selector);
}
if (message.get !== undefined) {
writer.uint32(18).string(message.get);
}
if (message.put !== undefined) {
writer.uint32(26).string(message.put);
}
if (message.post !== undefined) {
writer.uint32(34).string(message.post);
}
if (message.delete !== undefined) {
writer.uint32(42).string(message.delete);
}
if (message.patch !== undefined) {
writer.uint32(50).string(message.patch);
}
if (message.custom !== undefined) {
CustomHttpPattern.encode(
message.custom,
writer.uint32(66).fork()
).ldelim();
}
if (message.body !== "") {
writer.uint32(58).string(message.body);
}
if (message.responseBody !== "") {
writer.uint32(98).string(message.responseBody);
}
for (const v of message.additionalBindings) {
HttpRule.encode(v!, writer.uint32(90).fork()).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): HttpRule {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseHttpRule();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.selector = reader.string();
break;
case 2:
message.get = reader.string();
break;
case 3:
message.put = reader.string();
break;
case 4:
message.post = reader.string();
break;
case 5:
message.delete = reader.string();
break;
case 6:
message.patch = reader.string();
break;
case 8:
message.custom = CustomHttpPattern.decode(reader, reader.uint32());
break;
case 7:
message.body = reader.string();
break;
case 12:
message.responseBody = reader.string();
break;
case 11:
message.additionalBindings.push(
HttpRule.decode(reader, reader.uint32())
);
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): HttpRule {
return {
selector: isSet(object.selector) ? String(object.selector) : "",
get: isSet(object.get) ? String(object.get) : undefined,
put: isSet(object.put) ? String(object.put) : undefined,
post: isSet(object.post) ? String(object.post) : undefined,
delete: isSet(object.delete) ? String(object.delete) : undefined,
patch: isSet(object.patch) ? String(object.patch) : undefined,
custom: isSet(object.custom)
? CustomHttpPattern.fromJSON(object.custom)
: undefined,
body: isSet(object.body) ? String(object.body) : "",
responseBody: isSet(object.responseBody)
? String(object.responseBody)
: "",
additionalBindings: Array.isArray(object?.additionalBindings)
? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e))
: [],
};
},
toJSON(message: HttpRule): unknown {
const obj: any = {};
message.selector !== undefined && (obj.selector = message.selector);
message.get !== undefined && (obj.get = message.get);
message.put !== undefined && (obj.put = message.put);
message.post !== undefined && (obj.post = message.post);
message.delete !== undefined && (obj.delete = message.delete);
message.patch !== undefined && (obj.patch = message.patch);
message.custom !== undefined &&
(obj.custom = message.custom
? CustomHttpPattern.toJSON(message.custom)
: undefined);
message.body !== undefined && (obj.body = message.body);
message.responseBody !== undefined &&
(obj.responseBody = message.responseBody);
if (message.additionalBindings) {
obj.additionalBindings = message.additionalBindings.map((e) =>
e ? HttpRule.toJSON(e) : undefined
);
} else {
obj.additionalBindings = [];
}
return obj;
},
fromPartial<I extends Exact<DeepPartial<HttpRule>, I>>(object: I): HttpRule {
const message = createBaseHttpRule();
message.selector = object.selector ?? "";
message.get = object.get ?? undefined;
message.put = object.put ?? undefined;
message.post = object.post ?? undefined;
message.delete = object.delete ?? undefined;
message.patch = object.patch ?? undefined;
message.custom =
object.custom !== undefined && object.custom !== null
? CustomHttpPattern.fromPartial(object.custom)
: undefined;
message.body = object.body ?? "";
message.responseBody = object.responseBody ?? "";
message.additionalBindings =
object.additionalBindings?.map((e) => HttpRule.fromPartial(e)) || [];
return message;
},
};
function createBaseCustomHttpPattern(): CustomHttpPattern {
return { kind: "", path: "" };
}
export const CustomHttpPattern = {
encode(
message: CustomHttpPattern,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (message.kind !== "") {
writer.uint32(10).string(message.kind);
}
if (message.path !== "") {
writer.uint32(18).string(message.path);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): CustomHttpPattern {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCustomHttpPattern();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.kind = reader.string();
break;
case 2:
message.path = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): CustomHttpPattern {
return {
kind: isSet(object.kind) ? String(object.kind) : "",
path: isSet(object.path) ? String(object.path) : "",
};
},
toJSON(message: CustomHttpPattern): unknown {
const obj: any = {};
message.kind !== undefined && (obj.kind = message.kind);
message.path !== undefined && (obj.path = message.path);
return obj;
},
fromPartial<I extends Exact<DeepPartial<CustomHttpPattern>, I>>(
object: I
): CustomHttpPattern {
const message = createBaseCustomHttpPattern();
message.kind = object.kind ?? "";
message.path = object.path ?? "";
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,187 +0,0 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.protobuf";
/**
* A Duration represents a signed, fixed-length span of time represented
* as a count of seconds and fractions of seconds at nanosecond
* resolution. It is independent of any calendar and concepts like "day"
* or "month". It is related to Timestamp in that the difference between
* two Timestamp values is a Duration and it can be added or subtracted
* from a Timestamp. Range is approximately +-10,000 years.
*
* # Examples
*
* Example 1: Compute Duration from two Timestamps in pseudo code.
*
* Timestamp start = ...;
* Timestamp end = ...;
* Duration duration = ...;
*
* duration.seconds = end.seconds - start.seconds;
* duration.nanos = end.nanos - start.nanos;
*
* if (duration.seconds < 0 && duration.nanos > 0) {
* duration.seconds += 1;
* duration.nanos -= 1000000000;
* } else if (duration.seconds > 0 && duration.nanos < 0) {
* duration.seconds -= 1;
* duration.nanos += 1000000000;
* }
*
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
*
* Timestamp start = ...;
* Duration duration = ...;
* Timestamp end = ...;
*
* end.seconds = start.seconds + duration.seconds;
* end.nanos = start.nanos + duration.nanos;
*
* if (end.nanos < 0) {
* end.seconds -= 1;
* end.nanos += 1000000000;
* } else if (end.nanos >= 1000000000) {
* end.seconds += 1;
* end.nanos -= 1000000000;
* }
*
* Example 3: Compute Duration from datetime.timedelta in Python.
*
* td = datetime.timedelta(days=3, minutes=10)
* duration = Duration()
* duration.FromTimedelta(td)
*
* # JSON Mapping
*
* In JSON format, the Duration type is encoded as a string rather than an
* object, where the string ends in the suffix "s" (indicating seconds) and
* is preceded by the number of seconds, with nanoseconds expressed as
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
* microsecond should be expressed in JSON format as "3.000001s".
*/
export interface Duration {
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*/
seconds: Long;
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*/
nanos: number;
}
function createBaseDuration(): Duration {
return { seconds: Long.ZERO, nanos: 0 };
}
export const Duration = {
encode(
message: Duration,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (!message.seconds.isZero()) {
writer.uint32(8).int64(message.seconds);
}
if (message.nanos !== 0) {
writer.uint32(16).int32(message.nanos);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Duration {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDuration();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.seconds = reader.int64() as Long;
break;
case 2:
message.nanos = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Duration {
return {
seconds: isSet(object.seconds)
? Long.fromValue(object.seconds)
: Long.ZERO,
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
};
},
toJSON(message: Duration): unknown {
const obj: any = {};
message.seconds !== undefined &&
(obj.seconds = (message.seconds || Long.ZERO).toString());
message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
return obj;
},
fromPartial<I extends Exact<DeepPartial<Duration>, I>>(object: I): Duration {
const message = createBaseDuration();
message.seconds =
object.seconds !== undefined && object.seconds !== null
? Long.fromValue(object.seconds)
: Long.ZERO;
message.nanos = object.nanos ?? 0;
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}

View File

@ -1,220 +0,0 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.protobuf";
/**
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
*
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
*
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
*
* # Examples
*
* Example 1: Compute Timestamp from POSIX `time()`.
*
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
*
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
*
* struct timeval tv;
* gettimeofday(&tv, NULL);
*
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
*
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
*
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
*
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
*
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
*
* long millis = System.currentTimeMillis();
*
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
*
*
* Example 5: Compute Timestamp from Java `Instant.now()`.
*
* Instant now = Instant.now();
*
* Timestamp timestamp =
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
* .setNanos(now.getNano()).build();
*
*
* Example 6: Compute Timestamp from current time in Python.
*
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
*
* # JSON Mapping
*
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
*
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*/
export interface Timestamp {
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*/
seconds: Long;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*/
nanos: number;
}
function createBaseTimestamp(): Timestamp {
return { seconds: Long.ZERO, nanos: 0 };
}
export const Timestamp = {
encode(
message: Timestamp,
writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer {
if (!message.seconds.isZero()) {
writer.uint32(8).int64(message.seconds);
}
if (message.nanos !== 0) {
writer.uint32(16).int32(message.nanos);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTimestamp();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.seconds = reader.int64() as Long;
break;
case 2:
message.nanos = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): Timestamp {
return {
seconds: isSet(object.seconds)
? Long.fromValue(object.seconds)
: Long.ZERO,
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
};
},
toJSON(message: Timestamp): unknown {
const obj: any = {};
message.seconds !== undefined &&
(obj.seconds = (message.seconds || Long.ZERO).toString());
message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
return obj;
},
fromPartial<I extends Exact<DeepPartial<Timestamp>, I>>(
object: I
): Timestamp {
const message = createBaseTimestamp();
message.seconds =
object.seconds !== undefined && object.seconds !== null
? Long.fromValue(object.seconds)
: Long.ZERO;
message.nanos = object.nanos ?? 0;
return message;
},
};
type Builtin =
| Date
| Function
| Uint8Array
| string
| number
| boolean
| undefined;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}

View File

@ -95,7 +95,7 @@ const auctionFields = `
* Registry * Registry
*/ */
export class RegistryClient { export class RegistryClient {
_restEndpoint: string; _rpcEndpoint: string;
_graph: any; _graph: any;
/** /**
@ -128,14 +128,14 @@ export class RegistryClient {
/** /**
* New Client. * New Client.
*/ */
constructor (gqlEndpoint: string, restEndpoint: string) { constructor (gqlEndpoint: string, rpcEndpoint: string) {
assert(gqlEndpoint); assert(gqlEndpoint);
this._graph = graphqlClient(gqlEndpoint, { this._graph = graphqlClient(gqlEndpoint, {
method: 'POST', method: 'POST',
asJSON: true asJSON: true
}); });
this._restEndpoint = restEndpoint; this._rpcEndpoint = rpcEndpoint;
} }
/** /**

View File

@ -8,7 +8,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml');
jest.setTimeout(40 * 1000); jest.setTimeout(40 * 1000);
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
describe('Querying', () => { describe('Querying', () => {
let watcher: any; let watcher: any;
@ -16,7 +16,7 @@ describe('Querying', () => {
let bondId: string; let bondId: string;
beforeAll(async () => { beforeAll(async () => {
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
bondId = await registry.getNextBondId(privateKey); bondId = await registry.getNextBondId(privateKey);
await registry.createBond({ denom: DENOM, amount: '1000000000' }, privateKey, fee); await registry.createBond({ denom: DENOM, amount: '1000000000' }, privateKey, fee);
@ -31,7 +31,7 @@ describe('Querying', () => {
}); });
test('Endpoint and chain ID.', async () => { test('Endpoint and chain ID.', async () => {
expect(registry.endpoints.rest).toBe(restEndpoint); expect(registry.endpoints.rpc).toBe(rpcEndpoint);
expect(registry.endpoints.gql).toBe(gqlEndpoint); expect(registry.endpoints.gql).toBe(gqlEndpoint);
expect(registry.chainID).toBe(chainId); expect(registry.chainID).toBe(chainId);
}); });

View File

@ -25,7 +25,7 @@ export const getConfig = () => {
return { return {
chainId: process.env.COSMOS_CHAIN_ID || DEFAULT_CHAIN_ID, chainId: process.env.COSMOS_CHAIN_ID || DEFAULT_CHAIN_ID,
privateKey: process.env.PRIVATE_KEY, privateKey: process.env.PRIVATE_KEY,
restEndpoint: process.env.LACONICD_REST_ENDPOINT || 'http://localhost:26657', rpcEndpoint: process.env.LACONICD_RPC_ENDPOINT || 'http://localhost:26657',
gqlEndpoint: process.env.LACONICD_GQL_ENDPOINT || 'http://localhost:9473/api', gqlEndpoint: process.env.LACONICD_GQL_ENDPOINT || 'http://localhost:9473/api',
fee: { fee: {
amount: [{ denom: 'photon', amount: '40' }], amount: [{ denom: 'photon', amount: '40' }],

View File

@ -1,6 +1,6 @@
import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing'; import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing';
import { MsgCommitBidResponse, MsgCommitBid, MsgRevealBid, MsgRevealBidResponse } from '../../../proto2/cerc/auction/v1/tx'; import { MsgCommitBidResponse, MsgCommitBid, MsgRevealBid, MsgRevealBidResponse } from '../../../proto/cerc/auction/v1/tx';
export const typeUrlMsgCommitBid = '/cerc.auction.v1.MsgCommitBid'; export const typeUrlMsgCommitBid = '/cerc.auction.v1.MsgCommitBid';
export const typeUrlMsgCommitBidResponse = '/cerc.auction.v1.MsgCommitBidResponse'; export const typeUrlMsgCommitBidResponse = '/cerc.auction.v1.MsgCommitBidResponse';

View File

@ -9,7 +9,7 @@ import {
MsgRefillBondResponse, MsgRefillBondResponse,
MsgWithdrawBondResponse, MsgWithdrawBondResponse,
MsgCancelBondResponse MsgCancelBondResponse
} from '../../../proto2/cerc/bond/v1/tx'; } from '../../../proto/cerc/bond/v1/tx';
export const typeUrlMsgCreateBond = '/cerc.bond.v1.MsgCreateBond'; export const typeUrlMsgCreateBond = '/cerc.bond.v1.MsgCreateBond';
export const typeUrlMsgRefillBond = '/cerc.bond.v1.MsgRefillBond'; export const typeUrlMsgRefillBond = '/cerc.bond.v1.MsgRefillBond';

View File

@ -1,6 +1,6 @@
import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing'; import { EncodeObject, GeneratedType } from '@cosmjs/proto-signing';
import { MsgReserveAuthority, MsgReserveAuthorityResponse, MsgSetAuthorityBond, MsgSetAuthorityBondResponse, MsgSetRecord, MsgSetRecordResponse, MsgSetName, MsgSetNameResponse, MsgDeleteName, MsgDeleteNameResponse, MsgAssociateBond, MsgAssociateBondResponse, MsgDissociateBond, MsgDissociateBondResponse, MsgDissociateRecords, MsgReassociateRecords, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse } from '../../../proto2/cerc/registry/v1/tx'; import { MsgReserveAuthority, MsgReserveAuthorityResponse, MsgSetAuthorityBond, MsgSetAuthorityBondResponse, MsgSetRecord, MsgSetRecordResponse, MsgSetName, MsgSetNameResponse, MsgDeleteName, MsgDeleteNameResponse, MsgAssociateBond, MsgAssociateBondResponse, MsgDissociateBond, MsgDissociateBondResponse, MsgDissociateRecords, MsgReassociateRecords, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse } from '../../../proto/cerc/registry/v1/tx';
export const typeUrlMsgReserveAuthority = '/cerc.registry.v1.MsgReserveAuthority'; export const typeUrlMsgReserveAuthority = '/cerc.registry.v1.MsgReserveAuthority';
export const typeUrlMsgSetRecord = '/cerc.registry.v1.MsgSetRecord'; export const typeUrlMsgSetRecord = '/cerc.registry.v1.MsgSetRecord';

View File

@ -2,7 +2,7 @@ import { GeneratedType } from '@cosmjs/proto-signing';
import { import {
MsgSendResponse MsgSendResponse
} from '../../../proto2/cosmos/bank/v1beta1/tx'; } from '../../../proto/cosmos/bank/v1beta1/tx';
export const typeUrlMsgSendResponse = '/cosmos.bank.v1beta1.MsgSendResponse'; export const typeUrlMsgSendResponse = '/cosmos.bank.v1beta1.MsgSendResponse';

View File

@ -9,7 +9,7 @@ const WATCHER_YML_PATH = path.join(__dirname, './testing/data/watcher.yml');
jest.setTimeout(90 * 1000); jest.setTimeout(90 * 1000);
const { chainId, restEndpoint, gqlEndpoint, privateKey, fee } = getConfig(); const { chainId, rpcEndpoint, gqlEndpoint, privateKey, fee } = getConfig();
const utilTests = () => { const utilTests = () => {
let registry: Registry; let registry: Registry;
@ -19,7 +19,7 @@ const utilTests = () => {
let watcherId: string; let watcherId: string;
beforeAll(async () => { beforeAll(async () => {
registry = new Registry(gqlEndpoint, restEndpoint, chainId); registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);
// Create bond. // Create bond.
bondId = await registry.getNextBondId(privateKey); bondId = await registry.getNextBondId(privateKey);