Add built artifacts so yarn install works on this module from git
This commit is contained in:
parent
ff3d70cc0d
commit
10a4ecd5f2
49
dist/account.d.ts
vendored
Normal file
49
dist/account.d.ts
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/// <reference types="node" />
|
||||
import { Payload, Signature } from './types';
|
||||
/**
|
||||
* Registry account.
|
||||
*/
|
||||
export declare class Account {
|
||||
_privateKey: Buffer;
|
||||
_publicKey: Uint8Array;
|
||||
_encodedPubkey: string;
|
||||
_formattedCosmosAddress: string;
|
||||
_registryPublicKey: string;
|
||||
_registryAddress: string;
|
||||
_ethAddress: string;
|
||||
/**
|
||||
* Generate bip39 mnemonic.
|
||||
*/
|
||||
static generateMnemonic(): string;
|
||||
/**
|
||||
* Generate private key from mnemonic.
|
||||
*/
|
||||
static generateFromMnemonic(mnemonic: string): Promise<Account>;
|
||||
/**
|
||||
* New Account.
|
||||
*/
|
||||
constructor(privateKey: Buffer);
|
||||
get privateKey(): Buffer;
|
||||
get encodedPubkey(): string;
|
||||
get formattedCosmosAddress(): string;
|
||||
get registryPublicKey(): string;
|
||||
get registryAddress(): string;
|
||||
init(): void;
|
||||
/**
|
||||
* Get private key.
|
||||
*/
|
||||
getPrivateKey(): string;
|
||||
/**
|
||||
* Get cosmos address.
|
||||
*/
|
||||
getCosmosAddress(): string;
|
||||
/**
|
||||
* Get record signature.
|
||||
*/
|
||||
signRecord(record: any): Promise<Buffer>;
|
||||
signPayload(payload: Payload): Promise<Signature>;
|
||||
/**
|
||||
* Sign message.
|
||||
*/
|
||||
sign(message: any): string;
|
||||
}
|
178
dist/account.js
vendored
Normal file
178
dist/account.js
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Account = void 0;
|
||||
const assert_1 = __importDefault(require("assert"));
|
||||
const bip32_1 = __importDefault(require("bip32"));
|
||||
const ecc = __importStar(require("tiny-secp256k1"));
|
||||
const bip39 = __importStar(require("bip39"));
|
||||
const canonical_json_1 = __importDefault(require("canonical-json"));
|
||||
const secp256k1_1 = __importDefault(require("secp256k1"));
|
||||
const ethers_1 = require("ethers");
|
||||
const js_sha256_1 = require("js-sha256");
|
||||
const eth_sig_util_1 = require("@metamask/eth-sig-util");
|
||||
const crypto_1 = require("@cosmjs/crypto");
|
||||
const encoding_1 = require("@cosmjs/encoding");
|
||||
const address_converter_1 = require("@tharsis/address-converter");
|
||||
const amino_1 = require("@cosmjs/amino");
|
||||
const types_1 = require("./types");
|
||||
const AMINO_PREFIX = 'EB5AE98721';
|
||||
const HDPATH = "m/44'/60'/0'/0";
|
||||
const bip32 = (0, bip32_1.default)(ecc);
|
||||
/**
|
||||
* Registry account.
|
||||
*/
|
||||
class Account {
|
||||
/**
|
||||
* New Account.
|
||||
*/
|
||||
constructor(privateKey) {
|
||||
(0, assert_1.default)(privateKey);
|
||||
this._privateKey = privateKey;
|
||||
this.init();
|
||||
}
|
||||
/**
|
||||
* Generate bip39 mnemonic.
|
||||
*/
|
||||
static generateMnemonic() {
|
||||
return bip39.generateMnemonic();
|
||||
}
|
||||
/**
|
||||
* Generate private key from mnemonic.
|
||||
*/
|
||||
static generateFromMnemonic(mnemonic) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(mnemonic);
|
||||
const seed = yield bip39.mnemonicToSeed(mnemonic);
|
||||
const wallet = bip32.fromSeed(seed);
|
||||
const account = wallet.derivePath(HDPATH);
|
||||
const { privateKey } = account;
|
||||
(0, assert_1.default)(privateKey);
|
||||
return new Account(privateKey);
|
||||
});
|
||||
}
|
||||
get privateKey() {
|
||||
return this._privateKey;
|
||||
}
|
||||
get encodedPubkey() {
|
||||
return this._encodedPubkey;
|
||||
}
|
||||
get formattedCosmosAddress() {
|
||||
return this._formattedCosmosAddress;
|
||||
}
|
||||
get registryPublicKey() {
|
||||
return this._registryPublicKey;
|
||||
}
|
||||
get registryAddress() {
|
||||
return this._registryAddress;
|
||||
}
|
||||
init() {
|
||||
// Generate public key.
|
||||
this._publicKey = secp256k1_1.default.publicKeyCreate(this._privateKey);
|
||||
this._encodedPubkey = (0, amino_1.encodeSecp256k1Pubkey)(this._publicKey).value;
|
||||
// 2. Generate eth address.
|
||||
this._ethAddress = ethers_1.utils.computeAddress(this._publicKey);
|
||||
// 3. Generate cosmos-sdk formatted address.
|
||||
this._formattedCosmosAddress = (0, address_converter_1.ethToEthermint)(this._ethAddress);
|
||||
// 4. Generate registry formatted public key.
|
||||
const publicKeyInHex = AMINO_PREFIX + (0, encoding_1.toHex)(this._publicKey);
|
||||
this._registryPublicKey = Buffer.from(publicKeyInHex, 'hex').toString('base64');
|
||||
// 5. Generate registry formatted address.
|
||||
let publicKeySha256 = (0, js_sha256_1.sha256)(Buffer.from(publicKeyInHex, 'hex'));
|
||||
this._registryAddress = new crypto_1.Ripemd160().update((0, encoding_1.fromHex)(publicKeySha256)).digest().toString();
|
||||
}
|
||||
/**
|
||||
* Get private key.
|
||||
*/
|
||||
getPrivateKey() {
|
||||
return this._privateKey.toString('hex');
|
||||
}
|
||||
/**
|
||||
* Get cosmos address.
|
||||
*/
|
||||
getCosmosAddress() {
|
||||
return this._formattedCosmosAddress;
|
||||
}
|
||||
/**
|
||||
* Get record signature.
|
||||
*/
|
||||
signRecord(record) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(record);
|
||||
const recordAsJson = (0, canonical_json_1.default)(record);
|
||||
// Double sha256.
|
||||
const recordBytesToSign = Buffer.from((0, js_sha256_1.sha256)(Buffer.from((0, js_sha256_1.sha256)(Buffer.from(recordAsJson)), 'hex')), 'hex');
|
||||
// Sign message
|
||||
(0, assert_1.default)(recordBytesToSign);
|
||||
const messageToSignSha256 = (0, js_sha256_1.sha256)(recordBytesToSign);
|
||||
const messageToSignSha256InBytes = Buffer.from(messageToSignSha256, 'hex');
|
||||
const sigObj = secp256k1_1.default.ecdsaSign(messageToSignSha256InBytes, this.privateKey);
|
||||
return Buffer.from(sigObj.signature);
|
||||
});
|
||||
}
|
||||
signPayload(payload) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(payload);
|
||||
const { record } = payload;
|
||||
const messageToSign = record.getMessageToSign();
|
||||
const sig = yield this.signRecord(messageToSign);
|
||||
(0, assert_1.default)(this.registryPublicKey);
|
||||
const signature = new types_1.Signature(this.registryPublicKey, sig.toString('base64'));
|
||||
payload.addSignature(signature);
|
||||
return signature;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Sign message.
|
||||
*/
|
||||
sign(message) {
|
||||
(0, assert_1.default)(message);
|
||||
const eipMessageDomain = message.eipToSign.domain;
|
||||
const signature = (0, eth_sig_util_1.signTypedData)({
|
||||
data: {
|
||||
types: message.eipToSign.types,
|
||||
primaryType: message.eipToSign.primaryType,
|
||||
domain: eipMessageDomain,
|
||||
message: message.eipToSign.message
|
||||
},
|
||||
privateKey: this._privateKey,
|
||||
version: eth_sig_util_1.SignTypedDataVersion.V4
|
||||
});
|
||||
return signature;
|
||||
}
|
||||
}
|
||||
exports.Account = Account;
|
183
dist/index.d.ts
vendored
Normal file
183
dist/index.d.ts
vendored
Normal file
@ -0,0 +1,183 @@
|
||||
import { Chain, Sender, Fee, MessageSendParams } from '@tharsis/transactions';
|
||||
import { RegistryClient } from "./registry-client";
|
||||
import { Account } from "./account";
|
||||
import { MessageMsgAssociateBond, MessageMsgCancelBond, MessageMsgCreateBond, MessageMsgDissociateBond, MessageMsgDissociateRecords, MessageMsgReAssociateRecords, MessageMsgRefillBond, MessageMsgWithdrawBond } from "./messages/bond";
|
||||
import { MessageMsgDeleteName, MessageMsgSetAuthorityBond, MessageMsgSetName, MessageMsgSetRecord } from './messages/nameservice';
|
||||
import { MessageMsgCommitBid, MessageMsgRevealBid } from './messages/auction';
|
||||
export declare const parseTxResponse: (result: any, parseResponse?: ((data: string) => any) | undefined) => any;
|
||||
/**
|
||||
* Create an auction bid.
|
||||
*/
|
||||
export declare const createBid: (chainId: string, auctionId: string, bidderAddress: string, bidAmount: string, noise?: string | undefined) => Promise<{
|
||||
commitHash: string;
|
||||
reveal: {
|
||||
chainId: string;
|
||||
auctionId: string;
|
||||
bidderAddress: string;
|
||||
bidAmount: string;
|
||||
noise: string;
|
||||
};
|
||||
revealString: string;
|
||||
}>;
|
||||
export declare const isKeyValid: (key: string) => "" | RegExpMatchArray | null;
|
||||
export declare class Registry {
|
||||
_endpoints: {
|
||||
[key: string]: string;
|
||||
};
|
||||
_chainID: string;
|
||||
_chain: Chain;
|
||||
_client: RegistryClient;
|
||||
static processWriteError(error: string): string;
|
||||
constructor(restUrl: string, gqlUrl: string, chainId: string);
|
||||
/**
|
||||
* Get accounts by addresses.
|
||||
*/
|
||||
getAccounts(addresses: string[]): Promise<any>;
|
||||
get endpoints(): {
|
||||
[key: string]: string;
|
||||
};
|
||||
get chainID(): string;
|
||||
/**
|
||||
* Get server status.
|
||||
*/
|
||||
getStatus(): Promise<any>;
|
||||
/**
|
||||
* Get records by ids.
|
||||
*/
|
||||
getRecordsByIds(ids: string[], refs?: boolean): Promise<any>;
|
||||
/**
|
||||
* Get records by attributes.
|
||||
*/
|
||||
queryRecords(attributes: {
|
||||
[key: string]: any;
|
||||
}, all?: boolean, refs?: boolean): Promise<any>;
|
||||
/**
|
||||
* Resolve names to records.
|
||||
*/
|
||||
resolveNames(names: string[], refs?: boolean): Promise<any>;
|
||||
/**
|
||||
* Publish record.
|
||||
* @param transactionPrivateKey - private key in HEX to sign transaction.
|
||||
*/
|
||||
setRecord(params: {
|
||||
privateKey: string;
|
||||
record: any;
|
||||
bondId: string;
|
||||
}, transactionPrivateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Send coins.
|
||||
*/
|
||||
sendCoins(params: MessageSendParams, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Computes the next bondId for the given account private key.
|
||||
*/
|
||||
getNextBondId(privateKey: string): Promise<string>;
|
||||
/**
|
||||
* Get bonds by ids.
|
||||
*/
|
||||
getBondsByIds(ids: string[]): Promise<any>;
|
||||
/**
|
||||
* Query bonds by attributes.
|
||||
*/
|
||||
queryBonds(attributes?: {}): Promise<any>;
|
||||
/**
|
||||
* Create bond.
|
||||
*/
|
||||
createBond(params: MessageMsgCreateBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Refill bond.
|
||||
*/
|
||||
refillBond(params: MessageMsgRefillBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Withdraw (from) bond.
|
||||
*/
|
||||
withdrawBond(params: MessageMsgWithdrawBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Cancel bond.
|
||||
*/
|
||||
cancelBond(params: MessageMsgCancelBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Associate record with bond.
|
||||
*/
|
||||
associateBond(params: MessageMsgAssociateBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Dissociate record from bond.
|
||||
*/
|
||||
dissociateBond(params: MessageMsgDissociateBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Dissociate all records from bond.
|
||||
*/
|
||||
dissociateRecords(params: MessageMsgDissociateRecords, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Reassociate records (switch bond).
|
||||
*/
|
||||
reassociateRecords(params: MessageMsgReAssociateRecords, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Reserve authority.
|
||||
*/
|
||||
reserveAuthority(params: {
|
||||
name: string;
|
||||
owner?: string;
|
||||
}, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Set authority bond.
|
||||
*/
|
||||
setAuthorityBond(params: MessageMsgSetAuthorityBond, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Commit auction bid.
|
||||
*/
|
||||
commitBid(params: MessageMsgCommitBid, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Reveal auction bid.
|
||||
*/
|
||||
revealBid(params: MessageMsgRevealBid, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Get records by ids.
|
||||
*/
|
||||
getAuctionsByIds(ids: string[]): Promise<any>;
|
||||
/**
|
||||
* Lookup authorities by names.
|
||||
*/
|
||||
lookupAuthorities(names: string[], auction?: boolean): Promise<any>;
|
||||
/**
|
||||
* Set name (CRN) to record ID (CID).
|
||||
*/
|
||||
setName(params: MessageMsgSetName, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Lookup naming information.
|
||||
*/
|
||||
lookupNames(names: string[], history?: boolean): Promise<any>;
|
||||
/**
|
||||
* Delete name (CRN) mapping.
|
||||
*/
|
||||
deleteName(params: MessageMsgDeleteName, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Submit record transaction.
|
||||
* @param privateKey - private key in HEX to sign message.
|
||||
* @param txPrivateKey - private key in HEX to sign transaction.
|
||||
*/
|
||||
_submitRecordTx({ privateKey, record, bondId }: {
|
||||
privateKey: string;
|
||||
record: any;
|
||||
bondId: string;
|
||||
}, txPrivateKey: string, fee: Fee): Promise<any>;
|
||||
_submitRecordPayloadTx(params: MessageMsgSetRecord, privateKey: string, fee: Fee): Promise<any>;
|
||||
/**
|
||||
* Submit a generic Tx to the chain.
|
||||
*/
|
||||
_submitTx(message: any, privateKey: string, sender: Sender): Promise<any>;
|
||||
/**
|
||||
* https://evmos.dev/basics/chain_id.html
|
||||
*/
|
||||
_parseEthChainId(chainId: string): number;
|
||||
/**
|
||||
* Get sender used for creating message.
|
||||
*/
|
||||
_getSender(account: Account): Promise<{
|
||||
accountAddress: string;
|
||||
sequence: any;
|
||||
accountNumber: any;
|
||||
pubkey: string;
|
||||
}>;
|
||||
}
|
||||
export { Account };
|
510
dist/index.js
vendored
Normal file
510
dist/index.js
vendored
Normal file
@ -0,0 +1,510 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Account = exports.Registry = exports.isKeyValid = exports.createBid = exports.parseTxResponse = void 0;
|
||||
const is_url_1 = __importDefault(require("is-url"));
|
||||
const js_sha256_1 = require("js-sha256");
|
||||
const provider_1 = require("@tharsis/provider");
|
||||
const transactions_1 = require("@tharsis/transactions");
|
||||
const registry_client_1 = require("./registry-client");
|
||||
const account_1 = require("./account");
|
||||
Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return account_1.Account; } });
|
||||
const txbuilder_1 = require("./txbuilder");
|
||||
const types_1 = require("./types");
|
||||
const util_1 = require("./util");
|
||||
const bond_1 = require("./messages/bond");
|
||||
const nameservice_1 = require("./messages/nameservice");
|
||||
const auction_1 = require("./messages/auction");
|
||||
const DEFAULT_WRITE_ERROR = 'Unable to write to laconicd.';
|
||||
// Parse Tx response from cosmos-sdk.
|
||||
const parseTxResponse = (result, parseResponse) => {
|
||||
const { txhash: hash, height } = result, txResponse = __rest(result, ["txhash", "height"]);
|
||||
if (parseResponse) {
|
||||
txResponse.data = parseResponse(txResponse.data);
|
||||
}
|
||||
txResponse.events.forEach((event) => {
|
||||
event.attributes = event.attributes.map(({ key, value }) => ({
|
||||
key: Buffer.from(key, 'base64').toString('utf8'),
|
||||
value: Buffer.from(value, 'base64').toString('utf8')
|
||||
}));
|
||||
});
|
||||
return Object.assign({ hash, height }, txResponse);
|
||||
};
|
||||
exports.parseTxResponse = parseTxResponse;
|
||||
/**
|
||||
* Create an auction bid.
|
||||
*/
|
||||
const createBid = (chainId, auctionId, bidderAddress, bidAmount, noise) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
if (!noise) {
|
||||
noise = account_1.Account.generateMnemonic();
|
||||
}
|
||||
const reveal = {
|
||||
chainId,
|
||||
auctionId,
|
||||
bidderAddress,
|
||||
bidAmount,
|
||||
noise
|
||||
};
|
||||
const commitHash = yield util_1.Util.getContentId(reveal);
|
||||
const revealString = Buffer.from(JSON.stringify(reveal)).toString('hex');
|
||||
return {
|
||||
commitHash,
|
||||
reveal,
|
||||
revealString
|
||||
};
|
||||
});
|
||||
exports.createBid = createBid;
|
||||
const isKeyValid = (key) => key && key.match(/^[0-9a-fA-F]{64}$/);
|
||||
exports.isKeyValid = isKeyValid;
|
||||
class Registry {
|
||||
constructor(restUrl, gqlUrl, chainId) {
|
||||
if (!(0, is_url_1.default)(restUrl)) {
|
||||
throw new Error('Path to a REST endpoint should be provided.');
|
||||
}
|
||||
if (!(0, is_url_1.default)(gqlUrl)) {
|
||||
throw new Error('Path to a GQL endpoint should be provided.');
|
||||
}
|
||||
this._endpoints = {
|
||||
rest: restUrl,
|
||||
gql: gqlUrl
|
||||
};
|
||||
this._client = new registry_client_1.RegistryClient(restUrl, gqlUrl);
|
||||
this._chainID = chainId;
|
||||
this._chain = {
|
||||
cosmosChainId: chainId,
|
||||
chainId: this._parseEthChainId(chainId)
|
||||
};
|
||||
}
|
||||
static processWriteError(error) {
|
||||
// error string a stacktrace containing the message.
|
||||
// https://gist.github.com/nikugogoi/de55d390574ded3466abad8bffd81952#file-txresponse-js-L7
|
||||
const errorMessage = nameservice_1.NAMESERVICE_ERRORS.find(message => error.includes(message));
|
||||
if (!errorMessage) {
|
||||
console.error(error);
|
||||
}
|
||||
return errorMessage || DEFAULT_WRITE_ERROR;
|
||||
}
|
||||
/**
|
||||
* Get accounts by addresses.
|
||||
*/
|
||||
getAccounts(addresses) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.getAccounts(addresses);
|
||||
});
|
||||
}
|
||||
get endpoints() {
|
||||
return this._endpoints;
|
||||
}
|
||||
get chainID() {
|
||||
return this._chainID;
|
||||
}
|
||||
/**
|
||||
* Get server status.
|
||||
*/
|
||||
getStatus() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.getStatus();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get records by ids.
|
||||
*/
|
||||
getRecordsByIds(ids, refs = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.getRecordsByIds(ids, refs);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get records by attributes.
|
||||
*/
|
||||
queryRecords(attributes, all = false, refs = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.queryRecords(attributes, all, refs);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Resolve names to records.
|
||||
*/
|
||||
resolveNames(names, refs = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.resolveNames(names, refs);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Publish record.
|
||||
* @param transactionPrivateKey - private key in HEX to sign transaction.
|
||||
*/
|
||||
setRecord(params, transactionPrivateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
result = yield this._submitRecordTx(params, transactionPrivateKey, fee);
|
||||
return (0, exports.parseTxResponse)(result, nameservice_1.parseMsgSetRecordResponse);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Send coins.
|
||||
*/
|
||||
sendCoins(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, transactions_1.createMessageSend)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Computes the next bondId for the given account private key.
|
||||
*/
|
||||
getNextBondId(privateKey) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const accounts = yield this.getAccounts([account.formattedCosmosAddress]);
|
||||
if (!accounts.length) {
|
||||
throw new Error('Account does not exist.');
|
||||
}
|
||||
const [accountObj] = accounts;
|
||||
const nextSeq = parseInt(accountObj.sequence, 10) + 1;
|
||||
result = (0, js_sha256_1.sha256)(`${accountObj.address}:${accountObj.number}:${nextSeq}`);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get bonds by ids.
|
||||
*/
|
||||
getBondsByIds(ids) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.getBondsByIds(ids);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Query bonds by attributes.
|
||||
*/
|
||||
queryBonds(attributes = {}) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.queryBonds(attributes);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create bond.
|
||||
*/
|
||||
createBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgCreateBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Refill bond.
|
||||
*/
|
||||
refillBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgRefillBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Withdraw (from) bond.
|
||||
*/
|
||||
withdrawBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgWithdrawBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Cancel bond.
|
||||
*/
|
||||
cancelBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgCancelBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Associate record with bond.
|
||||
*/
|
||||
associateBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgAssociateBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Dissociate record from bond.
|
||||
*/
|
||||
dissociateBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgDissociateBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Dissociate all records from bond.
|
||||
*/
|
||||
dissociateRecords(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgDissociateRecords)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reassociate records (switch bond).
|
||||
*/
|
||||
reassociateRecords(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, bond_1.createTxMsgReAssociateRecords)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reserve authority.
|
||||
*/
|
||||
reserveAuthority(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msgParams = {
|
||||
name: params.name,
|
||||
owner: params.owner || sender.accountAddress
|
||||
};
|
||||
const msg = (0, nameservice_1.createTxMsgReserveAuthority)(this._chain, sender, fee, '', msgParams);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set authority bond.
|
||||
*/
|
||||
setAuthorityBond(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, nameservice_1.createTxMsgSetAuthorityBond)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Commit auction bid.
|
||||
*/
|
||||
commitBid(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, auction_1.createTxMsgCommitBid)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reveal auction bid.
|
||||
*/
|
||||
revealBid(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, auction_1.createTxMsgRevealBid)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get records by ids.
|
||||
*/
|
||||
getAuctionsByIds(ids) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.getAuctionsByIds(ids);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Lookup authorities by names.
|
||||
*/
|
||||
lookupAuthorities(names, auction = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.lookupAuthorities(names, auction);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set name (CRN) to record ID (CID).
|
||||
*/
|
||||
setName(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, nameservice_1.createTxMsgSetName)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Lookup naming information.
|
||||
*/
|
||||
lookupNames(names, history = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this._client.lookupNames(names, history);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Delete name (CRN) mapping.
|
||||
*/
|
||||
deleteName(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, nameservice_1.createTxMsgDeleteName)(this._chain, sender, fee, '', params);
|
||||
result = yield this._submitTx(msg, privateKey, sender);
|
||||
return (0, exports.parseTxResponse)(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Submit record transaction.
|
||||
* @param privateKey - private key in HEX to sign message.
|
||||
* @param txPrivateKey - private key in HEX to sign transaction.
|
||||
*/
|
||||
_submitRecordTx({ privateKey, record, bondId }, txPrivateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!(0, exports.isKeyValid)(privateKey)) {
|
||||
throw new Error('Registry privateKey should be a hex string.');
|
||||
}
|
||||
if (!(0, exports.isKeyValid)(bondId)) {
|
||||
throw new Error(`Invalid bondId: ${bondId}.`);
|
||||
}
|
||||
// Sign record.
|
||||
const recordSignerAccount = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const registryRecord = new types_1.Record(record);
|
||||
const payload = new types_1.Payload(registryRecord);
|
||||
yield recordSignerAccount.signPayload(payload);
|
||||
// Send record payload Tx.
|
||||
txPrivateKey = txPrivateKey || recordSignerAccount.getPrivateKey();
|
||||
return this._submitRecordPayloadTx({ payload, bondId }, txPrivateKey, fee);
|
||||
});
|
||||
}
|
||||
_submitRecordPayloadTx(params, privateKey, fee) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!(0, exports.isKeyValid)(privateKey)) {
|
||||
throw new Error('Registry privateKey should be a hex string.');
|
||||
}
|
||||
if (!(0, exports.isKeyValid)(params.bondId)) {
|
||||
throw new Error(`Invalid bondId: ${params.bondId}.`);
|
||||
}
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
const sender = yield this._getSender(account);
|
||||
const msg = (0, nameservice_1.createTxMsgSetRecord)(this._chain, sender, fee, '', params);
|
||||
return this._submitTx(msg, privateKey, sender);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Submit a generic Tx to the chain.
|
||||
*/
|
||||
_submitTx(message, privateKey, sender) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// Check private key.
|
||||
if (!(0, exports.isKeyValid)(privateKey)) {
|
||||
throw new Error('Registry privateKey should be a hex string.');
|
||||
}
|
||||
// Check that the account exists on-chain.
|
||||
const account = new account_1.Account(Buffer.from(privateKey, 'hex'));
|
||||
// Generate signed Tx.
|
||||
const transaction = (0, txbuilder_1.createTransaction)(message, account, sender, this._chain);
|
||||
const tx = (0, provider_1.generatePostBodyBroadcast)(transaction, provider_1.BroadcastMode.Block);
|
||||
// Submit Tx to chain.
|
||||
const { tx_response: response } = yield this._client.submit(tx);
|
||||
if (response.code !== 0) {
|
||||
// Throw error when transaction is not successful.
|
||||
// https://docs.starport.com/guide/nameservice/05-play.html#buy-name-transaction-details
|
||||
throw new Error(Registry.processWriteError(response.raw_log));
|
||||
}
|
||||
return response;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* https://evmos.dev/basics/chain_id.html
|
||||
*/
|
||||
_parseEthChainId(chainId) {
|
||||
const [idWithChainNumber] = chainId.split('-');
|
||||
const [_, ethChainId] = idWithChainNumber.split('_');
|
||||
return Number(ethChainId);
|
||||
}
|
||||
/**
|
||||
* Get sender used for creating message.
|
||||
*/
|
||||
_getSender(account) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const accounts = yield this.getAccounts([account.formattedCosmosAddress]);
|
||||
if (!accounts.length) {
|
||||
throw new Error('Account does not exist.');
|
||||
}
|
||||
const [{ number, sequence }] = accounts;
|
||||
return {
|
||||
accountAddress: account.formattedCosmosAddress,
|
||||
sequence: sequence,
|
||||
accountNumber: number,
|
||||
pubkey: account.encodedPubkey,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.Registry = Registry;
|
57
dist/messages/auction.d.ts
vendored
Normal file
57
dist/messages/auction.d.ts
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
import { Chain, Sender, Fee } from '@tharsis/transactions';
|
||||
export interface MessageMsgCommitBid {
|
||||
auctionId: string;
|
||||
commitHash: string;
|
||||
}
|
||||
export interface MessageMsgRevealBid {
|
||||
auctionId: string;
|
||||
reveal: string;
|
||||
}
|
||||
export declare function createTxMsgCommitBid(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgCommitBid): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgRevealBid(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgRevealBid): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
99
dist/messages/auction.js
vendored
Normal file
99
dist/messages/auction.js
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createTxMsgRevealBid = exports.createTxMsgCommitBid = void 0;
|
||||
const eip712_1 = require("@tharsis/eip712");
|
||||
const auctionTx = __importStar(require("../proto/vulcanize/auction/v1beta1/tx"));
|
||||
const util_1 = require("./util");
|
||||
const MSG_COMMIT_BID_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'auction_id', type: 'string' },
|
||||
{ name: 'commit_hash', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
const MSG_REVEAL_BID_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'auction_id', type: 'string' },
|
||||
{ name: 'reveal', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
function createTxMsgCommitBid(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_COMMIT_BID_TYPES);
|
||||
const msg = createMsgCommitBid(params.auctionId, params.commitHash, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgCommitBid(params.auctionId, params.commitHash, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgCommitBid = createTxMsgCommitBid;
|
||||
function createTxMsgRevealBid(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_REVEAL_BID_TYPES);
|
||||
const msg = createMsgRevealBid(params.auctionId, params.reveal, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgRevealBid(params.auctionId, params.reveal, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgRevealBid = createTxMsgRevealBid;
|
||||
function createMsgCommitBid(auctionId, commitHash, signer) {
|
||||
return {
|
||||
type: 'auction/MsgCommitBid',
|
||||
value: {
|
||||
auction_id: auctionId,
|
||||
commit_hash: commitHash,
|
||||
signer,
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgCommitBid = (auctionId, commitHash, signer) => {
|
||||
const commitBidMessage = new auctionTx.vulcanize.auction.v1beta1.MsgCommitBid({
|
||||
auction_id: auctionId,
|
||||
commit_hash: commitHash,
|
||||
signer,
|
||||
});
|
||||
return {
|
||||
message: commitBidMessage,
|
||||
path: 'vulcanize.auction.v1beta1.MsgCommitBid',
|
||||
};
|
||||
};
|
||||
function createMsgRevealBid(auctionId, reveal, signer) {
|
||||
return {
|
||||
type: 'auction/MsgRevealBid',
|
||||
value: {
|
||||
auction_id: auctionId,
|
||||
reveal,
|
||||
signer,
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgRevealBid = (auctionId, reveal, signer) => {
|
||||
const revealBidMessage = new auctionTx.vulcanize.auction.v1beta1.MsgRevealBid({
|
||||
auction_id: auctionId,
|
||||
reveal,
|
||||
signer,
|
||||
});
|
||||
return {
|
||||
message: revealBidMessage,
|
||||
path: 'vulcanize.auction.v1beta1.MsgRevealBid',
|
||||
};
|
||||
};
|
224
dist/messages/bond.d.ts
vendored
Normal file
224
dist/messages/bond.d.ts
vendored
Normal file
@ -0,0 +1,224 @@
|
||||
import { Chain, Sender, Fee } from '@tharsis/transactions';
|
||||
export interface MessageMsgCreateBond {
|
||||
amount: string;
|
||||
denom: string;
|
||||
}
|
||||
export interface MessageMsgRefillBond {
|
||||
id: string;
|
||||
amount: string;
|
||||
denom: string;
|
||||
}
|
||||
export interface MessageMsgWithdrawBond {
|
||||
id: string;
|
||||
amount: string;
|
||||
denom: string;
|
||||
}
|
||||
export interface MessageMsgCancelBond {
|
||||
id: string;
|
||||
}
|
||||
export interface MessageMsgAssociateBond {
|
||||
bondId: string;
|
||||
recordId: string;
|
||||
}
|
||||
export interface MessageMsgDissociateBond {
|
||||
recordId: string;
|
||||
}
|
||||
export interface MessageMsgDissociateRecords {
|
||||
bondId: string;
|
||||
}
|
||||
export interface MessageMsgReAssociateRecords {
|
||||
newBondId: string;
|
||||
oldBondId: string;
|
||||
}
|
||||
export declare function createTxMsgCreateBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgCreateBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgRefillBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgRefillBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgWithdrawBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgWithdrawBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgCancelBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgCancelBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgAssociateBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgAssociateBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgDissociateBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgDissociateBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgDissociateRecords(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgDissociateRecords): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgReAssociateRecords(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgReAssociateRecords): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
338
dist/messages/bond.js
vendored
Normal file
338
dist/messages/bond.js
vendored
Normal file
@ -0,0 +1,338 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createTxMsgReAssociateRecords = exports.createTxMsgDissociateRecords = exports.createTxMsgDissociateBond = exports.createTxMsgAssociateBond = exports.createTxMsgCancelBond = exports.createTxMsgWithdrawBond = exports.createTxMsgRefillBond = exports.createTxMsgCreateBond = void 0;
|
||||
const eip712_1 = require("@tharsis/eip712");
|
||||
const bondTx = __importStar(require("../proto/vulcanize/bond/v1beta1/tx"));
|
||||
const nameserviceTx = __importStar(require("../proto/vulcanize/nameservice/v1beta1/tx"));
|
||||
const coin = __importStar(require("../proto/cosmos/base/v1beta1/coin"));
|
||||
const util_1 = require("./util");
|
||||
const MSG_CREATE_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'signer', type: 'string' },
|
||||
{ name: 'coins', type: 'TypeCoins[]' },
|
||||
],
|
||||
TypeCoins: [
|
||||
{ name: 'denom', type: 'string' },
|
||||
{ name: 'amount', type: 'string' },
|
||||
],
|
||||
};
|
||||
const MSG_REFILL_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
{ name: 'coins', type: 'TypeCoins[]' },
|
||||
],
|
||||
TypeCoins: [
|
||||
{ name: 'denom', type: 'string' },
|
||||
{ name: 'amount', type: 'string' },
|
||||
],
|
||||
};
|
||||
const MSG_WITHDRAW_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
{ name: 'coins', type: 'TypeCoins[]' },
|
||||
],
|
||||
TypeCoins: [
|
||||
{ name: 'denom', type: 'string' },
|
||||
{ name: 'amount', type: 'string' },
|
||||
],
|
||||
};
|
||||
const MSG_CANCEL_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
const MSG_ASSOCIATE_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'record_id', type: 'string' },
|
||||
{ name: 'bond_id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
const MSG_DISSOCIATE_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'record_id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
const MSG_DISSOCIATE_RECORDS_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'bond_id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
const MSG_REASSOCIATE_RECORDS_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'new_bond_id', type: 'string' },
|
||||
{ name: 'old_bond_id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
]
|
||||
};
|
||||
function createTxMsgCreateBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_CREATE_BOND_TYPES);
|
||||
const msg = createMsgCreateBond(sender.accountAddress, params.amount, params.denom);
|
||||
const msgCosmos = protoCreateMsgCreateBond(sender.accountAddress, params.amount, params.denom);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgCreateBond = createTxMsgCreateBond;
|
||||
function createTxMsgRefillBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_REFILL_BOND_TYPES);
|
||||
const msg = createMsgRefillBond(params.id, sender.accountAddress, params.amount, params.denom);
|
||||
const msgCosmos = protoCreateMsgRefillBond(params.id, sender.accountAddress, params.amount, params.denom);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgRefillBond = createTxMsgRefillBond;
|
||||
function createTxMsgWithdrawBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_WITHDRAW_BOND_TYPES);
|
||||
const msg = createMsgWithdrawBond(params.id, sender.accountAddress, params.amount, params.denom);
|
||||
const msgCosmos = protoCreateMsgWithdrawBond(params.id, sender.accountAddress, params.amount, params.denom);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgWithdrawBond = createTxMsgWithdrawBond;
|
||||
function createTxMsgCancelBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_CANCEL_BOND_TYPES);
|
||||
const msg = createMsgCancelBond(params.id, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgCancelBond(params.id, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgCancelBond = createTxMsgCancelBond;
|
||||
function createTxMsgAssociateBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_ASSOCIATE_BOND_TYPES);
|
||||
const msg = createMsgAssociateBond(params.recordId, params.bondId, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgAssociateBond(params.recordId, params.bondId, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgAssociateBond = createTxMsgAssociateBond;
|
||||
function createTxMsgDissociateBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_DISSOCIATE_BOND_TYPES);
|
||||
const msg = createMsgDissociateBond(params.recordId, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgDissociateBond(params.recordId, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgDissociateBond = createTxMsgDissociateBond;
|
||||
function createTxMsgDissociateRecords(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_DISSOCIATE_RECORDS_TYPES);
|
||||
const msg = createMsgDissociateRecords(params.bondId, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgDissociateRecords(params.bondId, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgDissociateRecords = createTxMsgDissociateRecords;
|
||||
function createTxMsgReAssociateRecords(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_REASSOCIATE_RECORDS_TYPES);
|
||||
const msg = createMsgReAssociateRecords(params.newBondId, params.oldBondId, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgReAssociateRecords(params.newBondId, params.oldBondId, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgReAssociateRecords = createTxMsgReAssociateRecords;
|
||||
function createMsgCreateBond(signer, amount, denom) {
|
||||
return {
|
||||
type: 'bond/MsgCreateBond',
|
||||
value: {
|
||||
coins: [
|
||||
{
|
||||
amount,
|
||||
denom,
|
||||
},
|
||||
],
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgCreateBond = (signer, amount, denom) => {
|
||||
const value = new coin.cosmos.base.v1beta1.Coin({
|
||||
denom,
|
||||
amount,
|
||||
});
|
||||
const createBondMessage = new bondTx.vulcanize.bond.v1beta1.MsgCreateBond({
|
||||
signer,
|
||||
coins: [value]
|
||||
});
|
||||
return {
|
||||
message: createBondMessage,
|
||||
path: 'vulcanize.bond.v1beta1.MsgCreateBond',
|
||||
};
|
||||
};
|
||||
function createMsgRefillBond(id, signer, amount, denom) {
|
||||
return {
|
||||
type: 'bond/MsgRefillBond',
|
||||
value: {
|
||||
coins: [
|
||||
{
|
||||
amount,
|
||||
denom,
|
||||
},
|
||||
],
|
||||
id,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgRefillBond = (id, signer, amount, denom) => {
|
||||
const value = new coin.cosmos.base.v1beta1.Coin({
|
||||
denom,
|
||||
amount,
|
||||
});
|
||||
const refillBondMessage = new bondTx.vulcanize.bond.v1beta1.MsgRefillBond({
|
||||
id,
|
||||
signer,
|
||||
coins: [value]
|
||||
});
|
||||
return {
|
||||
message: refillBondMessage,
|
||||
path: 'vulcanize.bond.v1beta1.MsgRefillBond',
|
||||
};
|
||||
};
|
||||
function createMsgWithdrawBond(id, signer, amount, denom) {
|
||||
return {
|
||||
type: 'bond/MsgWithdrawBond',
|
||||
value: {
|
||||
id,
|
||||
coins: [
|
||||
{
|
||||
amount,
|
||||
denom,
|
||||
},
|
||||
],
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgWithdrawBond = (id, signer, amount, denom) => {
|
||||
const value = new coin.cosmos.base.v1beta1.Coin({
|
||||
denom,
|
||||
amount,
|
||||
});
|
||||
const withdrawBondMessage = new bondTx.vulcanize.bond.v1beta1.MsgWithdrawBond({
|
||||
id,
|
||||
signer,
|
||||
coins: [value]
|
||||
});
|
||||
return {
|
||||
message: withdrawBondMessage,
|
||||
path: 'vulcanize.bond.v1beta1.MsgWithdrawBond',
|
||||
};
|
||||
};
|
||||
function createMsgCancelBond(id, signer) {
|
||||
return {
|
||||
type: 'bond/MsgCancelBond',
|
||||
value: {
|
||||
id,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgCancelBond = (id, signer) => {
|
||||
const cancelBondMessage = new bondTx.vulcanize.bond.v1beta1.MsgCancelBond({
|
||||
id,
|
||||
signer
|
||||
});
|
||||
return {
|
||||
message: cancelBondMessage,
|
||||
path: 'vulcanize.bond.v1beta1.MsgCancelBond',
|
||||
};
|
||||
};
|
||||
function createMsgAssociateBond(recordId, bondId, signer) {
|
||||
return {
|
||||
type: 'nameservice/AssociateBond',
|
||||
value: {
|
||||
record_id: recordId,
|
||||
bond_id: bondId,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgAssociateBond = (recordId, bondId, signer) => {
|
||||
const associateBondMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgAssociateBond({
|
||||
record_id: recordId,
|
||||
bond_id: bondId,
|
||||
signer
|
||||
});
|
||||
return {
|
||||
message: associateBondMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgAssociateBond',
|
||||
};
|
||||
};
|
||||
function createMsgDissociateBond(recordId, signer) {
|
||||
return {
|
||||
type: 'nameservice/DissociateBond',
|
||||
value: {
|
||||
record_id: recordId,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgDissociateBond = (recordId, signer) => {
|
||||
const dissociateBondMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgDissociateBond({
|
||||
record_id: recordId,
|
||||
signer
|
||||
});
|
||||
return {
|
||||
message: dissociateBondMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgDissociateBond',
|
||||
};
|
||||
};
|
||||
function createMsgDissociateRecords(bondId, signer) {
|
||||
return {
|
||||
type: 'nameservice/DissociateRecords',
|
||||
value: {
|
||||
bond_id: bondId,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgDissociateRecords = (bondId, signer) => {
|
||||
const dissociateRecordsMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgDissociateRecords({
|
||||
bond_id: bondId,
|
||||
signer
|
||||
});
|
||||
return {
|
||||
message: dissociateRecordsMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgDissociateRecords',
|
||||
};
|
||||
};
|
||||
function createMsgReAssociateRecords(newBondId, oldBondId, signer) {
|
||||
return {
|
||||
type: 'nameservice/ReassociateRecords',
|
||||
value: {
|
||||
new_bond_id: newBondId,
|
||||
old_bond_id: oldBondId,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgReAssociateRecords = (newBondId, oldBondId, signer) => {
|
||||
const reAssociateRecordsMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgReAssociateRecords({
|
||||
new_bond_id: newBondId,
|
||||
old_bond_id: oldBondId,
|
||||
signer
|
||||
});
|
||||
return {
|
||||
message: reAssociateRecordsMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgReAssociateRecords',
|
||||
};
|
||||
};
|
145
dist/messages/nameservice.d.ts
vendored
Normal file
145
dist/messages/nameservice.d.ts
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
import { Chain, Sender, Fee } from '@tharsis/transactions';
|
||||
import { Payload } from '../types';
|
||||
export declare const parseMsgSetRecordResponse: (data: string) => {
|
||||
id: string;
|
||||
};
|
||||
export declare const NAMESERVICE_ERRORS: string[];
|
||||
export interface MessageMsgReserveAuthority {
|
||||
name: string;
|
||||
owner: string;
|
||||
}
|
||||
export interface MessageMsgSetName {
|
||||
crn: string;
|
||||
cid: string;
|
||||
}
|
||||
export interface MessageMsgSetRecord {
|
||||
bondId: string;
|
||||
payload: Payload;
|
||||
}
|
||||
export interface MessageMsgSetAuthorityBond {
|
||||
name: string;
|
||||
bondId: string;
|
||||
}
|
||||
export interface MessageMsgDeleteName {
|
||||
crn: string;
|
||||
}
|
||||
export declare function createTxMsgReserveAuthority(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgReserveAuthority): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgSetName(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgSetName): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgSetRecord(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgSetRecord): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgSetAuthorityBond(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgSetAuthorityBond): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export declare function createTxMsgDeleteName(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MessageMsgDeleteName): {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
240
dist/messages/nameservice.js
vendored
Normal file
240
dist/messages/nameservice.js
vendored
Normal file
@ -0,0 +1,240 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createTxMsgDeleteName = exports.createTxMsgSetAuthorityBond = exports.createTxMsgSetRecord = exports.createTxMsgSetName = exports.createTxMsgReserveAuthority = exports.NAMESERVICE_ERRORS = exports.parseMsgSetRecordResponse = void 0;
|
||||
const eip712_1 = require("@tharsis/eip712");
|
||||
const nameserviceTx = __importStar(require("../proto/vulcanize/nameservice/v1beta1/tx"));
|
||||
const nameservice = __importStar(require("../proto/vulcanize/nameservice/v1beta1/nameservice"));
|
||||
const util_1 = require("./util");
|
||||
const MSG_RESERVE_AUTHORITY_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'name', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
{ name: 'owner', type: 'string' },
|
||||
],
|
||||
};
|
||||
const MSG_SET_NAME_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'crn', type: 'string' },
|
||||
{ name: 'cid', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
],
|
||||
};
|
||||
const MSG_SET_RECORD_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'bond_id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
{ name: 'payload', type: 'TypePayload' },
|
||||
],
|
||||
TypePayload: [
|
||||
{ name: 'record', type: 'TypePayloadRecord' },
|
||||
{ name: 'signatures', type: 'TypePayloadSignatures[]' },
|
||||
],
|
||||
TypePayloadRecord: [
|
||||
{ name: 'id', type: 'string' },
|
||||
{ name: 'bond_id', type: 'string' },
|
||||
{ name: 'create_time', type: 'string' },
|
||||
{ name: 'expiry_time', type: 'string' },
|
||||
{ name: 'deleted', type: 'bool' },
|
||||
{ name: 'attributes', type: 'string' },
|
||||
],
|
||||
TypePayloadSignatures: [
|
||||
{ name: 'sig', type: 'string' },
|
||||
{ name: 'pub_key', type: 'string' }
|
||||
],
|
||||
};
|
||||
const MSG_SET_AUTHORITY_BOND_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'name', type: 'string' },
|
||||
{ name: 'bond_id', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
],
|
||||
};
|
||||
const MSG_DELETE_NAME_TYPES = {
|
||||
MsgValue: [
|
||||
{ name: 'crn', type: 'string' },
|
||||
{ name: 'signer', type: 'string' },
|
||||
],
|
||||
};
|
||||
const parseMsgSetRecordResponse = (data) => {
|
||||
const responseBytes = Buffer.from(data, 'hex');
|
||||
// TODO: Decode response using protobuf.
|
||||
// const msgSetRecordResponse = nameserviceTx.vulcanize.nameservice.v1beta1.MsgSetRecordResponse.deserialize(responseBytes);
|
||||
// return msgSetRecordResponse.toObject();
|
||||
// Workaround as proto based decoding is not working.
|
||||
const [_, id] = responseBytes.toString().split(';');
|
||||
return { id };
|
||||
};
|
||||
exports.parseMsgSetRecordResponse = parseMsgSetRecordResponse;
|
||||
exports.NAMESERVICE_ERRORS = [
|
||||
'Name already reserved.',
|
||||
'Authority bond not found.',
|
||||
'Name authority not found.',
|
||||
'Access denied.',
|
||||
];
|
||||
function createTxMsgReserveAuthority(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_RESERVE_AUTHORITY_TYPES);
|
||||
const msg = createMsgReserveAuthority(params.name, sender.accountAddress, params.owner);
|
||||
const msgCosmos = protoCreateMsgReserveAuthority(params.name, sender.accountAddress, params.owner);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgReserveAuthority = createTxMsgReserveAuthority;
|
||||
function createTxMsgSetName(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_SET_NAME_TYPES);
|
||||
const msg = createMsgSetName(params.crn, params.cid, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgSetName(params.crn, params.cid, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgSetName = createTxMsgSetName;
|
||||
function createTxMsgSetRecord(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_SET_RECORD_TYPES);
|
||||
const msg = createMsgSetRecord(params.bondId, params.payload, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgSetRecord(params.bondId, params.payload, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgSetRecord = createTxMsgSetRecord;
|
||||
function createTxMsgSetAuthorityBond(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_SET_AUTHORITY_BOND_TYPES);
|
||||
const msg = createMsgSetAuthorityBond(params.name, params.bondId, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgSetAuthorityBond(params.name, params.bondId, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgSetAuthorityBond = createTxMsgSetAuthorityBond;
|
||||
function createTxMsgDeleteName(chain, sender, fee, memo, params) {
|
||||
const types = (0, eip712_1.generateTypes)(MSG_DELETE_NAME_TYPES);
|
||||
const msg = createMsgDeleteName(params.crn, sender.accountAddress);
|
||||
const msgCosmos = protoCreateMsgDeleteName(params.crn, sender.accountAddress);
|
||||
return (0, util_1.createTx)(chain, sender, fee, memo, types, msg, msgCosmos);
|
||||
}
|
||||
exports.createTxMsgDeleteName = createTxMsgDeleteName;
|
||||
function createMsgReserveAuthority(name, signer, owner) {
|
||||
return {
|
||||
type: 'nameservice/ReserveAuthority',
|
||||
value: {
|
||||
name,
|
||||
signer,
|
||||
owner
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgReserveAuthority = (name, signer, owner) => {
|
||||
const reserveAuthorityMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgReserveAuthority({
|
||||
name,
|
||||
signer,
|
||||
owner
|
||||
});
|
||||
return {
|
||||
message: reserveAuthorityMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgReserveAuthority',
|
||||
};
|
||||
};
|
||||
function createMsgSetName(crn, cid, signer) {
|
||||
return {
|
||||
type: 'nameservice/SetName',
|
||||
value: {
|
||||
crn,
|
||||
cid,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgSetName = (crn, cid, signer) => {
|
||||
const setNameMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgSetName({
|
||||
crn,
|
||||
cid,
|
||||
signer,
|
||||
});
|
||||
return {
|
||||
message: setNameMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgSetName',
|
||||
};
|
||||
};
|
||||
function createMsgSetRecord(bondId, payload, signer) {
|
||||
return {
|
||||
type: 'nameservice/SetRecord',
|
||||
value: {
|
||||
bond_id: bondId,
|
||||
signer,
|
||||
payload: payload.serialize()
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgSetRecord = (bondId, payloadData, signer) => {
|
||||
const record = new nameservice.vulcanize.nameservice.v1beta1.Record(payloadData.record.serialize());
|
||||
const signatures = payloadData.signatures.map(signature => new nameservice.vulcanize.nameservice.v1beta1.Signature(signature.serialize()));
|
||||
const payload = new nameserviceTx.vulcanize.nameservice.v1beta1.Payload({
|
||||
record,
|
||||
signatures
|
||||
});
|
||||
const setNameMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgSetRecord({
|
||||
bond_id: bondId,
|
||||
signer,
|
||||
payload
|
||||
});
|
||||
return {
|
||||
message: setNameMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgSetRecord',
|
||||
};
|
||||
};
|
||||
function createMsgSetAuthorityBond(name, bondId, signer) {
|
||||
return {
|
||||
type: 'nameservice/SetAuthorityBond',
|
||||
value: {
|
||||
name,
|
||||
bond_id: bondId,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgSetAuthorityBond = (name, bondId, signer) => {
|
||||
const setAuthorityBondMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgSetAuthorityBond({
|
||||
name,
|
||||
bond_id: bondId,
|
||||
signer,
|
||||
});
|
||||
return {
|
||||
message: setAuthorityBondMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgSetAuthorityBond',
|
||||
};
|
||||
};
|
||||
function createMsgDeleteName(crn, signer) {
|
||||
return {
|
||||
type: 'nameservice/DeleteAuthority',
|
||||
value: {
|
||||
crn,
|
||||
signer
|
||||
},
|
||||
};
|
||||
}
|
||||
const protoCreateMsgDeleteName = (crn, signer) => {
|
||||
const deleteNameAutorityMessage = new nameserviceTx.vulcanize.nameservice.v1beta1.MsgDeleteNameAuthority({
|
||||
crn,
|
||||
signer,
|
||||
});
|
||||
return {
|
||||
message: deleteNameAutorityMessage,
|
||||
path: 'vulcanize.nameservice.v1beta1.MsgDeleteNameAuthority',
|
||||
};
|
||||
};
|
41
dist/messages/util.d.ts
vendored
Normal file
41
dist/messages/util.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import { Message } from "google-protobuf";
|
||||
import { Chain, Sender, Fee } from '@tharsis/transactions';
|
||||
interface Msg {
|
||||
type: string;
|
||||
value: any;
|
||||
}
|
||||
interface MsgCosmos {
|
||||
message: Message;
|
||||
path: string;
|
||||
}
|
||||
interface Types {
|
||||
[key: string]: Array<{
|
||||
name: string;
|
||||
type: string;
|
||||
}>;
|
||||
}
|
||||
export declare const createTx: (chain: Chain, sender: Sender, fee: Fee, memo: string, messageTypes: Types, msg: Msg, msgCosmos: MsgCosmos) => {
|
||||
signDirect: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
legacyAmino: {
|
||||
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
|
||||
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
|
||||
signBytes: string;
|
||||
};
|
||||
eipToSign: {
|
||||
types: object;
|
||||
primaryType: string;
|
||||
domain: {
|
||||
name: string;
|
||||
version: string;
|
||||
chainId: number;
|
||||
verifyingContract: string;
|
||||
salt: string;
|
||||
};
|
||||
message: object;
|
||||
};
|
||||
};
|
||||
export {};
|
20
dist/messages/util.js
vendored
Normal file
20
dist/messages/util.js
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createTx = void 0;
|
||||
const eip712_1 = require("@tharsis/eip712");
|
||||
const proto_1 = require("@tharsis/proto");
|
||||
const createTx = (chain, sender, fee, memo, messageTypes, msg, msgCosmos) => {
|
||||
// EIP712
|
||||
const feeObject = (0, eip712_1.generateFee)(fee.amount, fee.denom, fee.gas, sender.accountAddress);
|
||||
const types = (0, eip712_1.generateTypes)(messageTypes);
|
||||
const messages = (0, eip712_1.generateMessage)(sender.accountNumber.toString(), sender.sequence.toString(), chain.cosmosChainId, memo, feeObject, msg);
|
||||
const eipToSign = (0, eip712_1.createEIP712)(types, chain.chainId, messages);
|
||||
// Cosmos
|
||||
const tx = (0, proto_1.createTransaction)(msgCosmos, memo, fee.amount, fee.denom, parseInt(fee.gas, 10), 'ethsecp256', sender.pubkey, sender.sequence, sender.accountNumber, chain.cosmosChainId);
|
||||
return {
|
||||
signDirect: tx.signDirect,
|
||||
legacyAmino: tx.legacyAmino,
|
||||
eipToSign,
|
||||
};
|
||||
};
|
||||
exports.createTx = createTx;
|
69
dist/proto/cosmos/base/query/v1beta1/pagination.d.ts
vendored
Normal file
69
dist/proto/cosmos/base/query/v1beta1/pagination.d.ts
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: cosmos/base/query/v1beta1/pagination.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace cosmos.base.query.v1beta1 {
|
||||
class PageRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
key?: Uint8Array;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
count_total?: boolean;
|
||||
reverse?: boolean;
|
||||
});
|
||||
get key(): Uint8Array;
|
||||
set key(value: Uint8Array);
|
||||
get offset(): number;
|
||||
set offset(value: number);
|
||||
get limit(): number;
|
||||
set limit(value: number);
|
||||
get count_total(): boolean;
|
||||
set count_total(value: boolean);
|
||||
get reverse(): boolean;
|
||||
set reverse(value: boolean);
|
||||
static fromObject(data: {
|
||||
key?: Uint8Array;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
count_total?: boolean;
|
||||
reverse?: boolean;
|
||||
}): PageRequest;
|
||||
toObject(): {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): PageRequest;
|
||||
}
|
||||
class PageResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
next_key?: Uint8Array;
|
||||
total?: number;
|
||||
});
|
||||
get next_key(): Uint8Array;
|
||||
set next_key(value: Uint8Array);
|
||||
get total(): number;
|
||||
set total(value: number);
|
||||
static fromObject(data: {
|
||||
next_key?: Uint8Array;
|
||||
total?: number;
|
||||
}): PageResponse;
|
||||
toObject(): {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PageResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): PageResponse;
|
||||
}
|
||||
}
|
264
dist/proto/cosmos/base/query/v1beta1/pagination.js
vendored
Normal file
264
dist/proto/cosmos/base/query/v1beta1/pagination.js
vendored
Normal file
@ -0,0 +1,264 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cosmos = void 0;
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: cosmos/base/query/v1beta1/pagination.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var cosmos;
|
||||
(function (cosmos) {
|
||||
var base;
|
||||
(function (base) {
|
||||
var query;
|
||||
(function (query) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class PageRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("key" in data && data.key != undefined) {
|
||||
this.key = data.key;
|
||||
}
|
||||
if ("offset" in data && data.offset != undefined) {
|
||||
this.offset = data.offset;
|
||||
}
|
||||
if ("limit" in data && data.limit != undefined) {
|
||||
this.limit = data.limit;
|
||||
}
|
||||
if ("count_total" in data && data.count_total != undefined) {
|
||||
this.count_total = data.count_total;
|
||||
}
|
||||
if ("reverse" in data && data.reverse != undefined) {
|
||||
this.reverse = data.reverse;
|
||||
}
|
||||
}
|
||||
}
|
||||
get key() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set key(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get offset() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set offset(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get limit() {
|
||||
return pb_1.Message.getField(this, 3);
|
||||
}
|
||||
set limit(value) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
get count_total() {
|
||||
return pb_1.Message.getField(this, 4);
|
||||
}
|
||||
set count_total(value) {
|
||||
pb_1.Message.setField(this, 4, value);
|
||||
}
|
||||
get reverse() {
|
||||
return pb_1.Message.getField(this, 5);
|
||||
}
|
||||
set reverse(value) {
|
||||
pb_1.Message.setField(this, 5, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new PageRequest({});
|
||||
if (data.key != null) {
|
||||
message.key = data.key;
|
||||
}
|
||||
if (data.offset != null) {
|
||||
message.offset = data.offset;
|
||||
}
|
||||
if (data.limit != null) {
|
||||
message.limit = data.limit;
|
||||
}
|
||||
if (data.count_total != null) {
|
||||
message.count_total = data.count_total;
|
||||
}
|
||||
if (data.reverse != null) {
|
||||
message.reverse = data.reverse;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.key != null) {
|
||||
data.key = this.key;
|
||||
}
|
||||
if (this.offset != null) {
|
||||
data.offset = this.offset;
|
||||
}
|
||||
if (this.limit != null) {
|
||||
data.limit = this.limit;
|
||||
}
|
||||
if (this.count_total != null) {
|
||||
data.count_total = this.count_total;
|
||||
}
|
||||
if (this.reverse != null) {
|
||||
data.reverse = this.reverse;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.key !== undefined)
|
||||
writer.writeBytes(1, this.key);
|
||||
if (this.offset !== undefined)
|
||||
writer.writeUint64(2, this.offset);
|
||||
if (this.limit !== undefined)
|
||||
writer.writeUint64(3, this.limit);
|
||||
if (this.count_total !== undefined)
|
||||
writer.writeBool(4, this.count_total);
|
||||
if (this.reverse !== undefined)
|
||||
writer.writeBool(5, this.reverse);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.key = reader.readBytes();
|
||||
break;
|
||||
case 2:
|
||||
message.offset = reader.readUint64();
|
||||
break;
|
||||
case 3:
|
||||
message.limit = reader.readUint64();
|
||||
break;
|
||||
case 4:
|
||||
message.count_total = reader.readBool();
|
||||
break;
|
||||
case 5:
|
||||
message.reverse = reader.readBool();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return PageRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.PageRequest = PageRequest;
|
||||
class PageResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("next_key" in data && data.next_key != undefined) {
|
||||
this.next_key = data.next_key;
|
||||
}
|
||||
if ("total" in data && data.total != undefined) {
|
||||
this.total = data.total;
|
||||
}
|
||||
}
|
||||
}
|
||||
get next_key() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set next_key(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get total() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set total(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new PageResponse({});
|
||||
if (data.next_key != null) {
|
||||
message.next_key = data.next_key;
|
||||
}
|
||||
if (data.total != null) {
|
||||
message.total = data.total;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.next_key != null) {
|
||||
data.next_key = this.next_key;
|
||||
}
|
||||
if (this.total != null) {
|
||||
data.total = this.total;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.next_key !== undefined)
|
||||
writer.writeBytes(1, this.next_key);
|
||||
if (this.total !== undefined)
|
||||
writer.writeUint64(2, this.total);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PageResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.next_key = reader.readBytes();
|
||||
break;
|
||||
case 2:
|
||||
message.total = reader.readUint64();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return PageResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.PageResponse = PageResponse;
|
||||
})(v1beta1 = query.v1beta1 || (query.v1beta1 = {}));
|
||||
})(query = base.query || (base.query = {}));
|
||||
})(base = cosmos.base || (cosmos.base = {}));
|
||||
})(cosmos = exports.cosmos || (exports.cosmos = {}));
|
85
dist/proto/cosmos/base/v1beta1/coin.d.ts
vendored
Normal file
85
dist/proto/cosmos/base/v1beta1/coin.d.ts
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace cosmos.base.v1beta1 {
|
||||
class Coin extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
denom?: string;
|
||||
amount?: string;
|
||||
});
|
||||
get denom(): string;
|
||||
set denom(value: string);
|
||||
get amount(): string;
|
||||
set amount(value: string);
|
||||
static fromObject(data: {
|
||||
denom?: string;
|
||||
amount?: string;
|
||||
}): Coin;
|
||||
toObject(): {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Coin;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Coin;
|
||||
}
|
||||
class DecCoin extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
denom?: string;
|
||||
amount?: string;
|
||||
});
|
||||
get denom(): string;
|
||||
set denom(value: string);
|
||||
get amount(): string;
|
||||
set amount(value: string);
|
||||
static fromObject(data: {
|
||||
denom?: string;
|
||||
amount?: string;
|
||||
}): DecCoin;
|
||||
toObject(): {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecCoin;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): DecCoin;
|
||||
}
|
||||
class IntProto extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
int?: string;
|
||||
});
|
||||
get int(): string;
|
||||
set int(value: string);
|
||||
static fromObject(data: {
|
||||
int?: string;
|
||||
}): IntProto;
|
||||
toObject(): {
|
||||
int?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IntProto;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): IntProto;
|
||||
}
|
||||
class DecProto extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
dec?: string;
|
||||
});
|
||||
get dec(): string;
|
||||
set dec(value: string);
|
||||
static fromObject(data: {
|
||||
dec?: string;
|
||||
}): DecProto;
|
||||
toObject(): {
|
||||
dec?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DecProto;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): DecProto;
|
||||
}
|
||||
}
|
312
dist/proto/cosmos/base/v1beta1/coin.js
vendored
Normal file
312
dist/proto/cosmos/base/v1beta1/coin.js
vendored
Normal file
@ -0,0 +1,312 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cosmos = void 0;
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var cosmos;
|
||||
(function (cosmos) {
|
||||
var base;
|
||||
(function (base) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class Coin extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("denom" in data && data.denom != undefined) {
|
||||
this.denom = data.denom;
|
||||
}
|
||||
if ("amount" in data && data.amount != undefined) {
|
||||
this.amount = data.amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
get denom() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set denom(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get amount() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set amount(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new Coin({});
|
||||
if (data.denom != null) {
|
||||
message.denom = data.denom;
|
||||
}
|
||||
if (data.amount != null) {
|
||||
message.amount = data.amount;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.denom != null) {
|
||||
data.denom = this.denom;
|
||||
}
|
||||
if (this.amount != null) {
|
||||
data.amount = this.amount;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.denom === "string" && this.denom.length)
|
||||
writer.writeString(1, this.denom);
|
||||
if (typeof this.amount === "string" && this.amount.length)
|
||||
writer.writeString(2, this.amount);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Coin();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.denom = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
message.amount = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Coin.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Coin = Coin;
|
||||
class DecCoin extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("denom" in data && data.denom != undefined) {
|
||||
this.denom = data.denom;
|
||||
}
|
||||
if ("amount" in data && data.amount != undefined) {
|
||||
this.amount = data.amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
get denom() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set denom(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get amount() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set amount(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new DecCoin({});
|
||||
if (data.denom != null) {
|
||||
message.denom = data.denom;
|
||||
}
|
||||
if (data.amount != null) {
|
||||
message.amount = data.amount;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.denom != null) {
|
||||
data.denom = this.denom;
|
||||
}
|
||||
if (this.amount != null) {
|
||||
data.amount = this.amount;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.denom === "string" && this.denom.length)
|
||||
writer.writeString(1, this.denom);
|
||||
if (typeof this.amount === "string" && this.amount.length)
|
||||
writer.writeString(2, this.amount);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DecCoin();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.denom = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
message.amount = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return DecCoin.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.DecCoin = DecCoin;
|
||||
class IntProto extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("int" in data && data.int != undefined) {
|
||||
this.int = data.int;
|
||||
}
|
||||
}
|
||||
}
|
||||
get int() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set int(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new IntProto({});
|
||||
if (data.int != null) {
|
||||
message.int = data.int;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.int != null) {
|
||||
data.int = this.int;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.int === "string" && this.int.length)
|
||||
writer.writeString(1, this.int);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IntProto();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.int = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return IntProto.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.IntProto = IntProto;
|
||||
class DecProto extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("dec" in data && data.dec != undefined) {
|
||||
this.dec = data.dec;
|
||||
}
|
||||
}
|
||||
}
|
||||
get dec() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set dec(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new DecProto({});
|
||||
if (data.dec != null) {
|
||||
message.dec = data.dec;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.dec != null) {
|
||||
data.dec = this.dec;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.dec === "string" && this.dec.length)
|
||||
writer.writeString(1, this.dec);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return DecProto.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.DecProto = DecProto;
|
||||
})(v1beta1 = base.v1beta1 || (base.v1beta1 = {}));
|
||||
})(base = cosmos.base || (cosmos.base = {}));
|
||||
})(cosmos = exports.cosmos || (exports.cosmos = {}));
|
1
dist/proto/gogoproto/gogo.d.ts
vendored
Normal file
1
dist/proto/gogoproto/gogo.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare namespace gogoproto { }
|
2
dist/proto/gogoproto/gogo.js
vendored
Normal file
2
dist/proto/gogoproto/gogo.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
1
dist/proto/google/api/annotations.d.ts
vendored
Normal file
1
dist/proto/google/api/annotations.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare namespace google.api { }
|
2
dist/proto/google/api/annotations.js
vendored
Normal file
2
dist/proto/google/api/annotations.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
185
dist/proto/google/api/http.d.ts
vendored
Normal file
185
dist/proto/google/api/http.d.ts
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: google/api/http.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace google.api {
|
||||
class Http extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
rules?: HttpRule[];
|
||||
fully_decode_reserved_expansion?: boolean;
|
||||
});
|
||||
get rules(): HttpRule[];
|
||||
set rules(value: HttpRule[]);
|
||||
get fully_decode_reserved_expansion(): boolean;
|
||||
set fully_decode_reserved_expansion(value: boolean);
|
||||
static fromObject(data: {
|
||||
rules?: ReturnType<typeof HttpRule.prototype.toObject>[];
|
||||
fully_decode_reserved_expansion?: boolean;
|
||||
}): Http;
|
||||
toObject(): {
|
||||
rules?: {
|
||||
selector?: string | undefined;
|
||||
get?: string | undefined;
|
||||
put?: string | undefined;
|
||||
post?: string | undefined;
|
||||
delete?: string | undefined;
|
||||
patch?: string | undefined;
|
||||
custom?: {
|
||||
kind?: string | undefined;
|
||||
path?: string | undefined;
|
||||
} | undefined;
|
||||
body?: string | undefined;
|
||||
response_body?: string | undefined;
|
||||
additional_bindings?: any[] | undefined;
|
||||
}[] | undefined;
|
||||
fully_decode_reserved_expansion?: boolean | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Http;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Http;
|
||||
}
|
||||
class HttpRule extends pb_1.Message {
|
||||
constructor(data?: any[] | ({
|
||||
selector?: string;
|
||||
body?: string;
|
||||
response_body?: string;
|
||||
additional_bindings?: HttpRule[];
|
||||
} & (({
|
||||
get?: string;
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
patch?: never;
|
||||
custom?: never;
|
||||
} | {
|
||||
get?: never;
|
||||
put?: string;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
patch?: never;
|
||||
custom?: never;
|
||||
} | {
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: string;
|
||||
delete?: never;
|
||||
patch?: never;
|
||||
custom?: never;
|
||||
} | {
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: string;
|
||||
patch?: never;
|
||||
custom?: never;
|
||||
} | {
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
patch?: string;
|
||||
custom?: never;
|
||||
} | {
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
patch?: never;
|
||||
custom?: CustomHttpPattern;
|
||||
}))));
|
||||
get selector(): string;
|
||||
set selector(value: string);
|
||||
get get(): string;
|
||||
set get(value: string);
|
||||
get put(): string;
|
||||
set put(value: string);
|
||||
get post(): string;
|
||||
set post(value: string);
|
||||
get delete(): string;
|
||||
set delete(value: string);
|
||||
get patch(): string;
|
||||
set patch(value: string);
|
||||
get custom(): CustomHttpPattern;
|
||||
set custom(value: CustomHttpPattern);
|
||||
get body(): string;
|
||||
set body(value: string);
|
||||
get response_body(): string;
|
||||
set response_body(value: string);
|
||||
get additional_bindings(): HttpRule[];
|
||||
set additional_bindings(value: HttpRule[]);
|
||||
get pattern(): "patch" | "get" | "put" | "post" | "delete" | "custom" | "none";
|
||||
static fromObject(data: {
|
||||
selector?: string;
|
||||
get?: string;
|
||||
put?: string;
|
||||
post?: string;
|
||||
delete?: string;
|
||||
patch?: string;
|
||||
custom?: ReturnType<typeof CustomHttpPattern.prototype.toObject>;
|
||||
body?: string;
|
||||
response_body?: string;
|
||||
additional_bindings?: ReturnType<typeof HttpRule.prototype.toObject>[];
|
||||
}): HttpRule;
|
||||
toObject(): {
|
||||
selector?: string | undefined;
|
||||
get?: string | undefined;
|
||||
put?: string | undefined;
|
||||
post?: string | undefined;
|
||||
delete?: string | undefined;
|
||||
patch?: string | undefined;
|
||||
custom?: {
|
||||
kind?: string | undefined;
|
||||
path?: string | undefined;
|
||||
} | undefined;
|
||||
body?: string | undefined;
|
||||
response_body?: string | undefined;
|
||||
additional_bindings?: {
|
||||
selector?: string | undefined;
|
||||
get?: string | undefined;
|
||||
put?: string | undefined;
|
||||
post?: string | undefined;
|
||||
delete?: string | undefined;
|
||||
patch?: string | undefined;
|
||||
custom?: {
|
||||
kind?: string | undefined;
|
||||
path?: string | undefined;
|
||||
} | undefined;
|
||||
body?: string | undefined;
|
||||
response_body?: string | undefined;
|
||||
additional_bindings?: any[] | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HttpRule;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): HttpRule;
|
||||
}
|
||||
class CustomHttpPattern extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
kind?: string;
|
||||
path?: string;
|
||||
});
|
||||
get kind(): string;
|
||||
set kind(value: string);
|
||||
get path(): string;
|
||||
set path(value: string);
|
||||
static fromObject(data: {
|
||||
kind?: string;
|
||||
path?: string;
|
||||
}): CustomHttpPattern;
|
||||
toObject(): {
|
||||
kind?: string | undefined;
|
||||
path?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CustomHttpPattern;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): CustomHttpPattern;
|
||||
}
|
||||
}
|
449
dist/proto/google/api/http.js
vendored
Normal file
449
dist/proto/google/api/http.js
vendored
Normal file
@ -0,0 +1,449 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.google = void 0;
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: google/api/http.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var google;
|
||||
(function (google) {
|
||||
var api;
|
||||
(function (api) {
|
||||
class Http extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("rules" in data && data.rules != undefined) {
|
||||
this.rules = data.rules;
|
||||
}
|
||||
if ("fully_decode_reserved_expansion" in data && data.fully_decode_reserved_expansion != undefined) {
|
||||
this.fully_decode_reserved_expansion = data.fully_decode_reserved_expansion;
|
||||
}
|
||||
}
|
||||
}
|
||||
get rules() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, HttpRule, 1);
|
||||
}
|
||||
set rules(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
get fully_decode_reserved_expansion() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set fully_decode_reserved_expansion(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new Http({});
|
||||
if (data.rules != null) {
|
||||
message.rules = data.rules.map(item => HttpRule.fromObject(item));
|
||||
}
|
||||
if (data.fully_decode_reserved_expansion != null) {
|
||||
message.fully_decode_reserved_expansion = data.fully_decode_reserved_expansion;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.rules != null) {
|
||||
data.rules = this.rules.map((item) => item.toObject());
|
||||
}
|
||||
if (this.fully_decode_reserved_expansion != null) {
|
||||
data.fully_decode_reserved_expansion = this.fully_decode_reserved_expansion;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.rules !== undefined)
|
||||
writer.writeRepeatedMessage(1, this.rules, (item) => item.serialize(writer));
|
||||
if (this.fully_decode_reserved_expansion !== undefined)
|
||||
writer.writeBool(2, this.fully_decode_reserved_expansion);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Http();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.rules, () => pb_1.Message.addToRepeatedWrapperField(message, 1, HttpRule.deserialize(reader), HttpRule));
|
||||
break;
|
||||
case 2:
|
||||
message.fully_decode_reserved_expansion = reader.readBool();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Http.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
api.Http = Http;
|
||||
class HttpRule extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [11], [[2, 3, 4, 5, 6, 8]]);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("selector" in data && data.selector != undefined) {
|
||||
this.selector = data.selector;
|
||||
}
|
||||
if ("get" in data && data.get != undefined) {
|
||||
this.get = data.get;
|
||||
}
|
||||
if ("put" in data && data.put != undefined) {
|
||||
this.put = data.put;
|
||||
}
|
||||
if ("post" in data && data.post != undefined) {
|
||||
this.post = data.post;
|
||||
}
|
||||
if ("delete" in data && data.delete != undefined) {
|
||||
this.delete = data.delete;
|
||||
}
|
||||
if ("patch" in data && data.patch != undefined) {
|
||||
this.patch = data.patch;
|
||||
}
|
||||
if ("custom" in data && data.custom != undefined) {
|
||||
this.custom = data.custom;
|
||||
}
|
||||
if ("body" in data && data.body != undefined) {
|
||||
this.body = data.body;
|
||||
}
|
||||
if ("response_body" in data && data.response_body != undefined) {
|
||||
this.response_body = data.response_body;
|
||||
}
|
||||
if ("additional_bindings" in data && data.additional_bindings != undefined) {
|
||||
this.additional_bindings = data.additional_bindings;
|
||||
}
|
||||
}
|
||||
}
|
||||
get selector() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set selector(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get get() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set get(value) {
|
||||
pb_1.Message.setOneofField(this, 2, [2, 3, 4, 5, 6, 8], value);
|
||||
}
|
||||
get put() {
|
||||
return pb_1.Message.getField(this, 3);
|
||||
}
|
||||
set put(value) {
|
||||
pb_1.Message.setOneofField(this, 3, [2, 3, 4, 5, 6, 8], value);
|
||||
}
|
||||
get post() {
|
||||
return pb_1.Message.getField(this, 4);
|
||||
}
|
||||
set post(value) {
|
||||
pb_1.Message.setOneofField(this, 4, [2, 3, 4, 5, 6, 8], value);
|
||||
}
|
||||
get delete() {
|
||||
return pb_1.Message.getField(this, 5);
|
||||
}
|
||||
set delete(value) {
|
||||
pb_1.Message.setOneofField(this, 5, [2, 3, 4, 5, 6, 8], value);
|
||||
}
|
||||
get patch() {
|
||||
return pb_1.Message.getField(this, 6);
|
||||
}
|
||||
set patch(value) {
|
||||
pb_1.Message.setOneofField(this, 6, [2, 3, 4, 5, 6, 8], value);
|
||||
}
|
||||
get custom() {
|
||||
return pb_1.Message.getWrapperField(this, CustomHttpPattern, 8);
|
||||
}
|
||||
set custom(value) {
|
||||
pb_1.Message.setOneofWrapperField(this, 8, [2, 3, 4, 5, 6, 8], value);
|
||||
}
|
||||
get body() {
|
||||
return pb_1.Message.getField(this, 7);
|
||||
}
|
||||
set body(value) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
get response_body() {
|
||||
return pb_1.Message.getField(this, 12);
|
||||
}
|
||||
set response_body(value) {
|
||||
pb_1.Message.setField(this, 12, value);
|
||||
}
|
||||
get additional_bindings() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, HttpRule, 11);
|
||||
}
|
||||
set additional_bindings(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 11, value);
|
||||
}
|
||||
get pattern() {
|
||||
const cases = {
|
||||
0: "none",
|
||||
2: "get",
|
||||
3: "put",
|
||||
4: "post",
|
||||
5: "delete",
|
||||
6: "patch",
|
||||
8: "custom"
|
||||
};
|
||||
return cases[pb_1.Message.computeOneofCase(this, [2, 3, 4, 5, 6, 8])];
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new HttpRule({});
|
||||
if (data.selector != null) {
|
||||
message.selector = data.selector;
|
||||
}
|
||||
if (data.get != null) {
|
||||
message.get = data.get;
|
||||
}
|
||||
if (data.put != null) {
|
||||
message.put = data.put;
|
||||
}
|
||||
if (data.post != null) {
|
||||
message.post = data.post;
|
||||
}
|
||||
if (data.delete != null) {
|
||||
message.delete = data.delete;
|
||||
}
|
||||
if (data.patch != null) {
|
||||
message.patch = data.patch;
|
||||
}
|
||||
if (data.custom != null) {
|
||||
message.custom = CustomHttpPattern.fromObject(data.custom);
|
||||
}
|
||||
if (data.body != null) {
|
||||
message.body = data.body;
|
||||
}
|
||||
if (data.response_body != null) {
|
||||
message.response_body = data.response_body;
|
||||
}
|
||||
if (data.additional_bindings != null) {
|
||||
message.additional_bindings = data.additional_bindings.map(item => HttpRule.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.selector != null) {
|
||||
data.selector = this.selector;
|
||||
}
|
||||
if (this.get != null) {
|
||||
data.get = this.get;
|
||||
}
|
||||
if (this.put != null) {
|
||||
data.put = this.put;
|
||||
}
|
||||
if (this.post != null) {
|
||||
data.post = this.post;
|
||||
}
|
||||
if (this.delete != null) {
|
||||
data.delete = this.delete;
|
||||
}
|
||||
if (this.patch != null) {
|
||||
data.patch = this.patch;
|
||||
}
|
||||
if (this.custom != null) {
|
||||
data.custom = this.custom.toObject();
|
||||
}
|
||||
if (this.body != null) {
|
||||
data.body = this.body;
|
||||
}
|
||||
if (this.response_body != null) {
|
||||
data.response_body = this.response_body;
|
||||
}
|
||||
if (this.additional_bindings != null) {
|
||||
data.additional_bindings = this.additional_bindings.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.selector === "string" && this.selector.length)
|
||||
writer.writeString(1, this.selector);
|
||||
if (typeof this.get === "string" && this.get.length)
|
||||
writer.writeString(2, this.get);
|
||||
if (typeof this.put === "string" && this.put.length)
|
||||
writer.writeString(3, this.put);
|
||||
if (typeof this.post === "string" && this.post.length)
|
||||
writer.writeString(4, this.post);
|
||||
if (typeof this.delete === "string" && this.delete.length)
|
||||
writer.writeString(5, this.delete);
|
||||
if (typeof this.patch === "string" && this.patch.length)
|
||||
writer.writeString(6, this.patch);
|
||||
if (this.custom !== undefined)
|
||||
writer.writeMessage(8, this.custom, () => this.custom.serialize(writer));
|
||||
if (typeof this.body === "string" && this.body.length)
|
||||
writer.writeString(7, this.body);
|
||||
if (typeof this.response_body === "string" && this.response_body.length)
|
||||
writer.writeString(12, this.response_body);
|
||||
if (this.additional_bindings !== undefined)
|
||||
writer.writeRepeatedMessage(11, this.additional_bindings, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HttpRule();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.selector = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
message.get = reader.readString();
|
||||
break;
|
||||
case 3:
|
||||
message.put = reader.readString();
|
||||
break;
|
||||
case 4:
|
||||
message.post = reader.readString();
|
||||
break;
|
||||
case 5:
|
||||
message.delete = reader.readString();
|
||||
break;
|
||||
case 6:
|
||||
message.patch = reader.readString();
|
||||
break;
|
||||
case 8:
|
||||
reader.readMessage(message.custom, () => message.custom = CustomHttpPattern.deserialize(reader));
|
||||
break;
|
||||
case 7:
|
||||
message.body = reader.readString();
|
||||
break;
|
||||
case 12:
|
||||
message.response_body = reader.readString();
|
||||
break;
|
||||
case 11:
|
||||
reader.readMessage(message.additional_bindings, () => pb_1.Message.addToRepeatedWrapperField(message, 11, HttpRule.deserialize(reader), HttpRule));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return HttpRule.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
api.HttpRule = HttpRule;
|
||||
class CustomHttpPattern extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("kind" in data && data.kind != undefined) {
|
||||
this.kind = data.kind;
|
||||
}
|
||||
if ("path" in data && data.path != undefined) {
|
||||
this.path = data.path;
|
||||
}
|
||||
}
|
||||
}
|
||||
get kind() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set kind(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get path() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set path(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new CustomHttpPattern({});
|
||||
if (data.kind != null) {
|
||||
message.kind = data.kind;
|
||||
}
|
||||
if (data.path != null) {
|
||||
message.path = data.path;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.kind != null) {
|
||||
data.kind = this.kind;
|
||||
}
|
||||
if (this.path != null) {
|
||||
data.path = this.path;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.kind === "string" && this.kind.length)
|
||||
writer.writeString(1, this.kind);
|
||||
if (typeof this.path === "string" && this.path.length)
|
||||
writer.writeString(2, this.path);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CustomHttpPattern();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.kind = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
message.path = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return CustomHttpPattern.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
api.CustomHttpPattern = CustomHttpPattern;
|
||||
})(api = google.api || (google.api = {}));
|
||||
})(google = exports.google || (exports.google = {}));
|
1211
dist/proto/google/protobuf/descriptor.d.ts
vendored
Normal file
1211
dist/proto/google/protobuf/descriptor.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3476
dist/proto/google/protobuf/descriptor.js
vendored
Normal file
3476
dist/proto/google/protobuf/descriptor.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
31
dist/proto/google/protobuf/duration.d.ts
vendored
Normal file
31
dist/proto/google/protobuf/duration.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: google/protobuf/duration.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace google.protobuf {
|
||||
class Duration extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
seconds?: number;
|
||||
nanos?: number;
|
||||
});
|
||||
get seconds(): number;
|
||||
set seconds(value: number);
|
||||
get nanos(): number;
|
||||
set nanos(value: number);
|
||||
static fromObject(data: {
|
||||
seconds?: number;
|
||||
nanos?: number;
|
||||
}): Duration;
|
||||
toObject(): {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Duration;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Duration;
|
||||
}
|
||||
}
|
119
dist/proto/google/protobuf/duration.js
vendored
Normal file
119
dist/proto/google/protobuf/duration.js
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.google = void 0;
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: google/protobuf/duration.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var google;
|
||||
(function (google) {
|
||||
var protobuf;
|
||||
(function (protobuf) {
|
||||
class Duration extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("seconds" in data && data.seconds != undefined) {
|
||||
this.seconds = data.seconds;
|
||||
}
|
||||
if ("nanos" in data && data.nanos != undefined) {
|
||||
this.nanos = data.nanos;
|
||||
}
|
||||
}
|
||||
}
|
||||
get seconds() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set seconds(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get nanos() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set nanos(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new Duration({});
|
||||
if (data.seconds != null) {
|
||||
message.seconds = data.seconds;
|
||||
}
|
||||
if (data.nanos != null) {
|
||||
message.nanos = data.nanos;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.seconds != null) {
|
||||
data.seconds = this.seconds;
|
||||
}
|
||||
if (this.nanos != null) {
|
||||
data.nanos = this.nanos;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.seconds !== undefined)
|
||||
writer.writeInt64(1, this.seconds);
|
||||
if (this.nanos !== undefined)
|
||||
writer.writeInt32(2, this.nanos);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Duration();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.seconds = reader.readInt64();
|
||||
break;
|
||||
case 2:
|
||||
message.nanos = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Duration.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
protobuf.Duration = Duration;
|
||||
})(protobuf = google.protobuf || (google.protobuf = {}));
|
||||
})(google = exports.google || (exports.google = {}));
|
31
dist/proto/google/protobuf/timestamp.d.ts
vendored
Normal file
31
dist/proto/google/protobuf/timestamp.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: google/protobuf/timestamp.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace google.protobuf {
|
||||
class Timestamp extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
seconds?: number;
|
||||
nanos?: number;
|
||||
});
|
||||
get seconds(): number;
|
||||
set seconds(value: number);
|
||||
get nanos(): number;
|
||||
set nanos(value: number);
|
||||
static fromObject(data: {
|
||||
seconds?: number;
|
||||
nanos?: number;
|
||||
}): Timestamp;
|
||||
toObject(): {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Timestamp;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Timestamp;
|
||||
}
|
||||
}
|
119
dist/proto/google/protobuf/timestamp.js
vendored
Normal file
119
dist/proto/google/protobuf/timestamp.js
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.google = void 0;
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: google/protobuf/timestamp.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var google;
|
||||
(function (google) {
|
||||
var protobuf;
|
||||
(function (protobuf) {
|
||||
class Timestamp extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("seconds" in data && data.seconds != undefined) {
|
||||
this.seconds = data.seconds;
|
||||
}
|
||||
if ("nanos" in data && data.nanos != undefined) {
|
||||
this.nanos = data.nanos;
|
||||
}
|
||||
}
|
||||
}
|
||||
get seconds() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set seconds(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get nanos() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set nanos(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new Timestamp({});
|
||||
if (data.seconds != null) {
|
||||
message.seconds = data.seconds;
|
||||
}
|
||||
if (data.nanos != null) {
|
||||
message.nanos = data.nanos;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.seconds != null) {
|
||||
data.seconds = this.seconds;
|
||||
}
|
||||
if (this.nanos != null) {
|
||||
data.nanos = this.nanos;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.seconds !== undefined)
|
||||
writer.writeInt64(1, this.seconds);
|
||||
if (this.nanos !== undefined)
|
||||
writer.writeInt32(2, this.nanos);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Timestamp();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.seconds = reader.readInt64();
|
||||
break;
|
||||
case 2:
|
||||
message.nanos = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Timestamp.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
protobuf.Timestamp = Timestamp;
|
||||
})(protobuf = google.protobuf || (google.protobuf = {}));
|
||||
})(google = exports.google || (exports.google = {}));
|
85
dist/proto/vulcanize/auction/v1beta1/genesis.d.ts
vendored
Normal file
85
dist/proto/vulcanize/auction/v1beta1/genesis.d.ts
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
import * as dependency_2 from "./types";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.auction.v1beta1 {
|
||||
class GenesisState extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
params?: dependency_2.vulcanize.auction.v1beta1.Params;
|
||||
auctions?: dependency_2.vulcanize.auction.v1beta1.Auction[];
|
||||
});
|
||||
get params(): dependency_2.vulcanize.auction.v1beta1.Params;
|
||||
set params(value: dependency_2.vulcanize.auction.v1beta1.Params);
|
||||
get auctions(): dependency_2.vulcanize.auction.v1beta1.Auction[];
|
||||
set auctions(value: dependency_2.vulcanize.auction.v1beta1.Auction[]);
|
||||
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;
|
||||
toObject(): {
|
||||
params?: {
|
||||
commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
auctions?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): GenesisState;
|
||||
}
|
||||
}
|
116
dist/proto/vulcanize/auction/v1beta1/genesis.js
vendored
Normal file
116
dist/proto/vulcanize/auction/v1beta1/genesis.js
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./types"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var auction;
|
||||
(function (auction) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class GenesisState extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
|
||||
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);
|
||||
}
|
||||
set params(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get auctions() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.auction.v1beta1.Auction, 2);
|
||||
}
|
||||
set auctions(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.params != null) {
|
||||
data.params = this.params.toObject();
|
||||
}
|
||||
if (this.auctions != null) {
|
||||
data.auctions = this.auctions.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.params !== undefined)
|
||||
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
|
||||
if (this.auctions !== undefined)
|
||||
writer.writeRepeatedMessage(2, this.auctions, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return GenesisState.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.GenesisState = GenesisState;
|
||||
})(v1beta1 = auction.v1beta1 || (auction.v1beta1 = {}));
|
||||
})(auction = vulcanize.auction || (vulcanize.auction = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
528
dist/proto/vulcanize/auction/v1beta1/query.d.ts
vendored
Normal file
528
dist/proto/vulcanize/auction/v1beta1/query.d.ts
vendored
Normal file
@ -0,0 +1,528 @@
|
||||
import * as dependency_3 from "./../../../cosmos/base/query/v1beta1/pagination";
|
||||
import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin";
|
||||
import * as dependency_5 from "./types";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.auction.v1beta1 {
|
||||
class AuctionsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): AuctionsRequest;
|
||||
toObject(): {
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionsRequest;
|
||||
}
|
||||
class AuctionsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auctions?: dependency_5.vulcanize.auction.v1beta1.Auctions;
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get auctions(): dependency_5.vulcanize.auction.v1beta1.Auctions;
|
||||
set auctions(value: dependency_5.vulcanize.auction.v1beta1.Auctions);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
auctions?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Auctions.prototype.toObject>;
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): AuctionsResponse;
|
||||
toObject(): {
|
||||
auctions?: {
|
||||
auctions?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionsResponse;
|
||||
}
|
||||
class AuctionRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
}): AuctionRequest;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionRequest;
|
||||
}
|
||||
class AuctionResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction?: dependency_5.vulcanize.auction.v1beta1.Auction;
|
||||
});
|
||||
get auction(): dependency_5.vulcanize.auction.v1beta1.Auction;
|
||||
set auction(value: dependency_5.vulcanize.auction.v1beta1.Auction);
|
||||
static fromObject(data: {
|
||||
auction?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
|
||||
}): AuctionResponse;
|
||||
toObject(): {
|
||||
auction?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionResponse;
|
||||
}
|
||||
class BidRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction_id?: string;
|
||||
bidder?: string;
|
||||
});
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
get bidder(): string;
|
||||
set bidder(value: string);
|
||||
static fromObject(data: {
|
||||
auction_id?: string;
|
||||
bidder?: string;
|
||||
}): BidRequest;
|
||||
toObject(): {
|
||||
auction_id?: string | undefined;
|
||||
bidder?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BidRequest;
|
||||
}
|
||||
class BidResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bid?: dependency_5.vulcanize.auction.v1beta1.Bid;
|
||||
});
|
||||
get bid(): dependency_5.vulcanize.auction.v1beta1.Bid;
|
||||
set bid(value: dependency_5.vulcanize.auction.v1beta1.Bid);
|
||||
static fromObject(data: {
|
||||
bid?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Bid.prototype.toObject>;
|
||||
}): BidResponse;
|
||||
toObject(): {
|
||||
bid?: {
|
||||
auction_id?: string | undefined;
|
||||
bidder_address?: string | undefined;
|
||||
status?: string | undefined;
|
||||
commit_hash?: string | undefined;
|
||||
commit_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
bid_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BidResponse;
|
||||
}
|
||||
class BidsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction_id?: string;
|
||||
});
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
static fromObject(data: {
|
||||
auction_id?: string;
|
||||
}): BidsRequest;
|
||||
toObject(): {
|
||||
auction_id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BidsRequest;
|
||||
}
|
||||
class BidsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bids?: dependency_5.vulcanize.auction.v1beta1.Bid[];
|
||||
});
|
||||
get bids(): dependency_5.vulcanize.auction.v1beta1.Bid[];
|
||||
set bids(value: dependency_5.vulcanize.auction.v1beta1.Bid[]);
|
||||
static fromObject(data: {
|
||||
bids?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Bid.prototype.toObject>[];
|
||||
}): BidsResponse;
|
||||
toObject(): {
|
||||
bids?: {
|
||||
auction_id?: string | undefined;
|
||||
bidder_address?: string | undefined;
|
||||
status?: string | undefined;
|
||||
commit_hash?: string | undefined;
|
||||
commit_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
bid_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BidsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BidsResponse;
|
||||
}
|
||||
class AuctionsByBidderRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bidder_address?: string;
|
||||
});
|
||||
get bidder_address(): string;
|
||||
set bidder_address(value: string);
|
||||
static fromObject(data: {
|
||||
bidder_address?: string;
|
||||
}): AuctionsByBidderRequest;
|
||||
toObject(): {
|
||||
bidder_address?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByBidderRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionsByBidderRequest;
|
||||
}
|
||||
class AuctionsByBidderResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auctions?: dependency_5.vulcanize.auction.v1beta1.Auctions;
|
||||
});
|
||||
get auctions(): dependency_5.vulcanize.auction.v1beta1.Auctions;
|
||||
set auctions(value: dependency_5.vulcanize.auction.v1beta1.Auctions);
|
||||
static fromObject(data: {
|
||||
auctions?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Auctions.prototype.toObject>;
|
||||
}): AuctionsByBidderResponse;
|
||||
toObject(): {
|
||||
auctions?: {
|
||||
auctions?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByBidderResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionsByBidderResponse;
|
||||
}
|
||||
class AuctionsByOwnerRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
owner_address?: string;
|
||||
});
|
||||
get owner_address(): string;
|
||||
set owner_address(value: string);
|
||||
static fromObject(data: {
|
||||
owner_address?: string;
|
||||
}): AuctionsByOwnerRequest;
|
||||
toObject(): {
|
||||
owner_address?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByOwnerRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionsByOwnerRequest;
|
||||
}
|
||||
class AuctionsByOwnerResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auctions?: dependency_5.vulcanize.auction.v1beta1.Auctions;
|
||||
});
|
||||
get auctions(): dependency_5.vulcanize.auction.v1beta1.Auctions;
|
||||
set auctions(value: dependency_5.vulcanize.auction.v1beta1.Auctions);
|
||||
static fromObject(data: {
|
||||
auctions?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Auctions.prototype.toObject>;
|
||||
}): AuctionsByOwnerResponse;
|
||||
toObject(): {
|
||||
auctions?: {
|
||||
auctions?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionsByOwnerResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionsByOwnerResponse;
|
||||
}
|
||||
class QueryParamsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): QueryParamsRequest;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryParamsRequest;
|
||||
}
|
||||
class QueryParamsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
params?: dependency_5.vulcanize.auction.v1beta1.Params;
|
||||
});
|
||||
get params(): dependency_5.vulcanize.auction.v1beta1.Params;
|
||||
set params(value: dependency_5.vulcanize.auction.v1beta1.Params);
|
||||
static fromObject(data: {
|
||||
params?: ReturnType<typeof dependency_5.vulcanize.auction.v1beta1.Params.prototype.toObject>;
|
||||
}): QueryParamsResponse;
|
||||
toObject(): {
|
||||
params?: {
|
||||
commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryParamsResponse;
|
||||
}
|
||||
class BalanceRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): BalanceRequest;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BalanceRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BalanceRequest;
|
||||
}
|
||||
class BalanceResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
balance?: dependency_4.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get balance(): dependency_4.cosmos.base.v1beta1.Coin[];
|
||||
set balance(value: dependency_4.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
balance?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): BalanceResponse;
|
||||
toObject(): {
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BalanceResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BalanceResponse;
|
||||
}
|
||||
}
|
981
dist/proto/vulcanize/auction/v1beta1/query.js
vendored
Normal file
981
dist/proto/vulcanize/auction/v1beta1/query.js
vendored
Normal file
@ -0,0 +1,981 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_3 = __importStar(require("./../../../cosmos/base/query/v1beta1/pagination"));
|
||||
const dependency_4 = __importStar(require("./../../../cosmos/base/v1beta1/coin"));
|
||||
const dependency_5 = __importStar(require("./types"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var auction;
|
||||
(function (auction) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class AuctionsRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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_3.cosmos.base.query.v1beta1.PageRequest, 1);
|
||||
}
|
||||
set pagination(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionsRequest({});
|
||||
if (data.pagination != null) {
|
||||
message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.pagination != null) {
|
||||
data.pagination = this.pagination.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.pagination !== undefined)
|
||||
writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionsRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionsRequest = AuctionsRequest;
|
||||
class AuctionsResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auctions" in data && data.auctions != undefined) {
|
||||
this.auctions = data.auctions;
|
||||
}
|
||||
if ("pagination" in data && data.pagination != undefined) {
|
||||
this.pagination = data.pagination;
|
||||
}
|
||||
}
|
||||
}
|
||||
get auctions() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auctions, 1);
|
||||
}
|
||||
set auctions(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get pagination() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.query.v1beta1.PageRequest, 2);
|
||||
}
|
||||
set pagination(value) {
|
||||
pb_1.Message.setWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionsResponse({});
|
||||
if (data.auctions != null) {
|
||||
message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.fromObject(data.auctions);
|
||||
}
|
||||
if (data.pagination != null) {
|
||||
message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auctions != null) {
|
||||
data.auctions = this.auctions.toObject();
|
||||
}
|
||||
if (this.pagination != null) {
|
||||
data.pagination = this.pagination.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auctions !== undefined)
|
||||
writer.writeMessage(1, this.auctions, () => this.auctions.serialize(writer));
|
||||
if (this.pagination !== undefined)
|
||||
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.auctions, () => message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
reader.readMessage(message.pagination, () => message.pagination = dependency_3.cosmos.base.query.v1beta1.PageRequest.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionsResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionsResponse = AuctionsResponse;
|
||||
class AuctionRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("id" in data && data.id != undefined) {
|
||||
this.id = data.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionRequest({});
|
||||
if (data.id != null) {
|
||||
message.id = data.id;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.id = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionRequest = AuctionRequest;
|
||||
class AuctionResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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_5.vulcanize.auction.v1beta1.Auction, 1);
|
||||
}
|
||||
set auction(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionResponse({});
|
||||
if (data.auction != null) {
|
||||
message.auction = dependency_5.vulcanize.auction.v1beta1.Auction.fromObject(data.auction);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auction != null) {
|
||||
data.auction = this.auction.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auction !== undefined)
|
||||
writer.writeMessage(1, this.auction, () => this.auction.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.auction, () => message.auction = dependency_5.vulcanize.auction.v1beta1.Auction.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionResponse = AuctionResponse;
|
||||
class BidRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auction_id" in data && data.auction_id != undefined) {
|
||||
this.auction_id = data.auction_id;
|
||||
}
|
||||
if ("bidder" in data && data.bidder != undefined) {
|
||||
this.bidder = data.bidder;
|
||||
}
|
||||
}
|
||||
}
|
||||
get auction_id() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set auction_id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get bidder() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set bidder(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new BidRequest({});
|
||||
if (data.auction_id != null) {
|
||||
message.auction_id = data.auction_id;
|
||||
}
|
||||
if (data.bidder != null) {
|
||||
message.bidder = data.bidder;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auction_id != null) {
|
||||
data.auction_id = this.auction_id;
|
||||
}
|
||||
if (this.bidder != null) {
|
||||
data.bidder = this.bidder;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.auction_id === "string" && this.auction_id.length)
|
||||
writer.writeString(1, this.auction_id);
|
||||
if (typeof this.bidder === "string" && this.bidder.length)
|
||||
writer.writeString(2, this.bidder);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.auction_id = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
message.bidder = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return BidRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.BidRequest = BidRequest;
|
||||
class BidResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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_5.vulcanize.auction.v1beta1.Bid, 1);
|
||||
}
|
||||
set bid(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new BidResponse({});
|
||||
if (data.bid != null) {
|
||||
message.bid = dependency_5.vulcanize.auction.v1beta1.Bid.fromObject(data.bid);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.bid != null) {
|
||||
data.bid = this.bid.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.bid !== undefined)
|
||||
writer.writeMessage(1, this.bid, () => this.bid.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.bid, () => message.bid = dependency_5.vulcanize.auction.v1beta1.Bid.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return BidResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.BidResponse = BidResponse;
|
||||
class BidsRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auction_id" in data && data.auction_id != undefined) {
|
||||
this.auction_id = data.auction_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
get auction_id() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set auction_id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new BidsRequest({});
|
||||
if (data.auction_id != null) {
|
||||
message.auction_id = data.auction_id;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auction_id != null) {
|
||||
data.auction_id = this.auction_id;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.auction_id === "string" && this.auction_id.length)
|
||||
writer.writeString(1, this.auction_id);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidsRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.auction_id = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return BidsRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.BidsRequest = BidsRequest;
|
||||
class BidsResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("bids" in data && data.bids != undefined) {
|
||||
this.bids = data.bids;
|
||||
}
|
||||
}
|
||||
}
|
||||
get bids() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Bid, 1);
|
||||
}
|
||||
set bids(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new BidsResponse({});
|
||||
if (data.bids != null) {
|
||||
message.bids = data.bids.map(item => dependency_5.vulcanize.auction.v1beta1.Bid.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.bids != null) {
|
||||
data.bids = this.bids.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.bids !== undefined)
|
||||
writer.writeRepeatedMessage(1, this.bids, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BidsResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.bids, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_5.vulcanize.auction.v1beta1.Bid.deserialize(reader), dependency_5.vulcanize.auction.v1beta1.Bid));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return BidsResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.BidsResponse = BidsResponse;
|
||||
class AuctionsByBidderRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("bidder_address" in data && data.bidder_address != undefined) {
|
||||
this.bidder_address = data.bidder_address;
|
||||
}
|
||||
}
|
||||
}
|
||||
get bidder_address() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set bidder_address(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionsByBidderRequest({});
|
||||
if (data.bidder_address != null) {
|
||||
message.bidder_address = data.bidder_address;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.bidder_address != null) {
|
||||
data.bidder_address = this.bidder_address;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.bidder_address === "string" && this.bidder_address.length)
|
||||
writer.writeString(1, this.bidder_address);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByBidderRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.bidder_address = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionsByBidderRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionsByBidderRequest = AuctionsByBidderRequest;
|
||||
class AuctionsByBidderResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auctions" in data && data.auctions != undefined) {
|
||||
this.auctions = data.auctions;
|
||||
}
|
||||
}
|
||||
}
|
||||
get auctions() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auctions, 1);
|
||||
}
|
||||
set auctions(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionsByBidderResponse({});
|
||||
if (data.auctions != null) {
|
||||
message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.fromObject(data.auctions);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auctions != null) {
|
||||
data.auctions = this.auctions.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auctions !== undefined)
|
||||
writer.writeMessage(1, this.auctions, () => this.auctions.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByBidderResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.auctions, () => message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionsByBidderResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionsByBidderResponse = AuctionsByBidderResponse;
|
||||
class AuctionsByOwnerRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("owner_address" in data && data.owner_address != undefined) {
|
||||
this.owner_address = data.owner_address;
|
||||
}
|
||||
}
|
||||
}
|
||||
get owner_address() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set owner_address(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionsByOwnerRequest({});
|
||||
if (data.owner_address != null) {
|
||||
message.owner_address = data.owner_address;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.owner_address != null) {
|
||||
data.owner_address = this.owner_address;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.owner_address === "string" && this.owner_address.length)
|
||||
writer.writeString(1, this.owner_address);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByOwnerRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.owner_address = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionsByOwnerRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionsByOwnerRequest = AuctionsByOwnerRequest;
|
||||
class AuctionsByOwnerResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auctions" in data && data.auctions != undefined) {
|
||||
this.auctions = data.auctions;
|
||||
}
|
||||
}
|
||||
}
|
||||
get auctions() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_5.vulcanize.auction.v1beta1.Auctions, 1);
|
||||
}
|
||||
set auctions(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new AuctionsByOwnerResponse({});
|
||||
if (data.auctions != null) {
|
||||
message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.fromObject(data.auctions);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auctions != null) {
|
||||
data.auctions = this.auctions.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auctions !== undefined)
|
||||
writer.writeMessage(1, this.auctions, () => this.auctions.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AuctionsByOwnerResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.auctions, () => message.auctions = dependency_5.vulcanize.auction.v1beta1.Auctions.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return AuctionsByOwnerResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.AuctionsByOwnerResponse = AuctionsByOwnerResponse;
|
||||
class QueryParamsRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryParamsRequest({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryParamsRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryParamsRequest = QueryParamsRequest;
|
||||
class QueryParamsResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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_5.vulcanize.auction.v1beta1.Params, 1);
|
||||
}
|
||||
set params(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryParamsResponse({});
|
||||
if (data.params != null) {
|
||||
message.params = dependency_5.vulcanize.auction.v1beta1.Params.fromObject(data.params);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.params != null) {
|
||||
data.params = this.params.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.params !== undefined)
|
||||
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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_5.vulcanize.auction.v1beta1.Params.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryParamsResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryParamsResponse = QueryParamsResponse;
|
||||
class BalanceRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new BalanceRequest({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BalanceRequest();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return BalanceRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.BalanceRequest = BalanceRequest;
|
||||
class BalanceResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], []);
|
||||
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_4.cosmos.base.v1beta1.Coin, 1);
|
||||
}
|
||||
set balance(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new BalanceResponse({});
|
||||
if (data.balance != null) {
|
||||
message.balance = data.balance.map(item => dependency_4.cosmos.base.v1beta1.Coin.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.balance != null) {
|
||||
data.balance = this.balance.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.balance !== undefined)
|
||||
writer.writeRepeatedMessage(1, this.balance, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BalanceResponse();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.balance, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.cosmos.base.v1beta1.Coin.deserialize(reader), dependency_4.cosmos.base.v1beta1.Coin));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return BalanceResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.BalanceResponse = BalanceResponse;
|
||||
})(v1beta1 = auction.v1beta1 || (auction.v1beta1 = {}));
|
||||
})(auction = vulcanize.auction || (vulcanize.auction = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
273
dist/proto/vulcanize/auction/v1beta1/tx.d.ts
vendored
Normal file
273
dist/proto/vulcanize/auction/v1beta1/tx.d.ts
vendored
Normal file
@ -0,0 +1,273 @@
|
||||
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 declare namespace vulcanize.auction.v1beta1 {
|
||||
class MsgCreateAuction extends pb_1.Message {
|
||||
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;
|
||||
});
|
||||
get commits_duration(): dependency_2.google.protobuf.Duration;
|
||||
set commits_duration(value: dependency_2.google.protobuf.Duration);
|
||||
get reveals_duration(): dependency_2.google.protobuf.Duration;
|
||||
set reveals_duration(value: dependency_2.google.protobuf.Duration);
|
||||
get commit_fee(): dependency_3.cosmos.base.v1beta1.Coin;
|
||||
set commit_fee(value: dependency_3.cosmos.base.v1beta1.Coin);
|
||||
get reveal_fee(): dependency_3.cosmos.base.v1beta1.Coin;
|
||||
set reveal_fee(value: dependency_3.cosmos.base.v1beta1.Coin);
|
||||
get minimum_bid(): dependency_3.cosmos.base.v1beta1.Coin;
|
||||
set minimum_bid(value: dependency_3.cosmos.base.v1beta1.Coin);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
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;
|
||||
toObject(): {
|
||||
commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateAuction;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCreateAuction;
|
||||
}
|
||||
class MsgCreateAuctionResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction?: dependency_4.vulcanize.auction.v1beta1.Auction;
|
||||
});
|
||||
get auction(): dependency_4.vulcanize.auction.v1beta1.Auction;
|
||||
set auction(value: dependency_4.vulcanize.auction.v1beta1.Auction);
|
||||
static fromObject(data: {
|
||||
auction?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
|
||||
}): MsgCreateAuctionResponse;
|
||||
toObject(): {
|
||||
auction?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateAuctionResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCreateAuctionResponse;
|
||||
}
|
||||
class MsgCommitBid extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction_id?: string;
|
||||
commit_hash?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
get commit_hash(): string;
|
||||
set commit_hash(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
auction_id?: string;
|
||||
commit_hash?: string;
|
||||
signer?: string;
|
||||
}): MsgCommitBid;
|
||||
toObject(): {
|
||||
auction_id?: string | undefined;
|
||||
commit_hash?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommitBid;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCommitBid;
|
||||
}
|
||||
class MsgRevealBid extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction_id?: string;
|
||||
reveal?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
get reveal(): string;
|
||||
set reveal(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
auction_id?: string;
|
||||
reveal?: string;
|
||||
signer?: string;
|
||||
}): MsgRevealBid;
|
||||
toObject(): {
|
||||
auction_id?: string | undefined;
|
||||
reveal?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevealBid;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgRevealBid;
|
||||
}
|
||||
class MsgCommitBidResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bid?: dependency_4.vulcanize.auction.v1beta1.Bid;
|
||||
});
|
||||
get bid(): dependency_4.vulcanize.auction.v1beta1.Bid;
|
||||
set bid(value: dependency_4.vulcanize.auction.v1beta1.Bid);
|
||||
static fromObject(data: {
|
||||
bid?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Bid.prototype.toObject>;
|
||||
}): MsgCommitBidResponse;
|
||||
toObject(): {
|
||||
bid?: {
|
||||
auction_id?: string | undefined;
|
||||
bidder_address?: string | undefined;
|
||||
status?: string | undefined;
|
||||
commit_hash?: string | undefined;
|
||||
commit_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
bid_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCommitBidResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCommitBidResponse;
|
||||
}
|
||||
class MsgRevealBidResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction?: dependency_4.vulcanize.auction.v1beta1.Auction;
|
||||
});
|
||||
get auction(): dependency_4.vulcanize.auction.v1beta1.Auction;
|
||||
set auction(value: dependency_4.vulcanize.auction.v1beta1.Auction);
|
||||
static fromObject(data: {
|
||||
auction?: ReturnType<typeof dependency_4.vulcanize.auction.v1beta1.Auction.prototype.toObject>;
|
||||
}): MsgRevealBidResponse;
|
||||
toObject(): {
|
||||
auction?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRevealBidResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgRevealBidResponse;
|
||||
}
|
||||
}
|
573
dist/proto/vulcanize/auction/v1beta1/tx.js
vendored
Normal file
573
dist/proto/vulcanize/auction/v1beta1/tx.js
vendored
Normal file
@ -0,0 +1,573 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./../../../google/protobuf/duration"));
|
||||
const dependency_3 = __importStar(require("./../../../cosmos/base/v1beta1/coin"));
|
||||
const dependency_4 = __importStar(require("./types"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var auction;
|
||||
(function (auction) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class MsgCreateAuction extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set commits_duration(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get reveals_duration() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2);
|
||||
}
|
||||
set reveals_duration(value) {
|
||||
pb_1.Message.setWrapperField(this, 2, value);
|
||||
}
|
||||
get commit_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 3);
|
||||
}
|
||||
set commit_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 3, value);
|
||||
}
|
||||
get reveal_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 4);
|
||||
}
|
||||
set reveal_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 4, value);
|
||||
}
|
||||
get minimum_bid() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.cosmos.base.v1beta1.Coin, 5);
|
||||
}
|
||||
set minimum_bid(value) {
|
||||
pb_1.Message.setWrapperField(this, 5, value);
|
||||
}
|
||||
get signer() {
|
||||
return pb_1.Message.getField(this, 6);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 6, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.commits_duration !== undefined)
|
||||
writer.writeMessage(1, this.commits_duration, () => this.commits_duration.serialize(writer));
|
||||
if (this.reveals_duration !== undefined)
|
||||
writer.writeMessage(2, this.reveals_duration, () => this.reveals_duration.serialize(writer));
|
||||
if (this.commit_fee !== undefined)
|
||||
writer.writeMessage(3, this.commit_fee, () => this.commit_fee.serialize(writer));
|
||||
if (this.reveal_fee !== undefined)
|
||||
writer.writeMessage(4, this.reveal_fee, () => this.reveal_fee.serialize(writer));
|
||||
if (this.minimum_bid !== undefined)
|
||||
writer.writeMessage(5, this.minimum_bid, () => this.minimum_bid.serialize(writer));
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(6, this.signer);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCreateAuction.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCreateAuction = MsgCreateAuction;
|
||||
class MsgCreateAuctionResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set auction(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgCreateAuctionResponse({});
|
||||
if (data.auction != null) {
|
||||
message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.fromObject(data.auction);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auction != null) {
|
||||
data.auction = this.auction.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auction !== undefined)
|
||||
writer.writeMessage(1, this.auction, () => this.auction.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCreateAuctionResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCreateAuctionResponse = MsgCreateAuctionResponse;
|
||||
class MsgCommitBid extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auction_id" in data && data.auction_id != undefined) {
|
||||
this.auction_id = data.auction_id;
|
||||
}
|
||||
if ("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.getField(this, 1);
|
||||
}
|
||||
set auction_id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get commit_hash() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set commit_hash(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get signer() {
|
||||
return pb_1.Message.getField(this, 3);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.auction_id === "string" && this.auction_id.length)
|
||||
writer.writeString(1, this.auction_id);
|
||||
if (typeof this.commit_hash === "string" && this.commit_hash.length)
|
||||
writer.writeString(2, this.commit_hash);
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(3, this.signer);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCommitBid.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCommitBid = MsgCommitBid;
|
||||
class MsgRevealBid extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auction_id" in data && data.auction_id != undefined) {
|
||||
this.auction_id = data.auction_id;
|
||||
}
|
||||
if ("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.getField(this, 1);
|
||||
}
|
||||
set auction_id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get reveal() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set reveal(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get signer() {
|
||||
return pb_1.Message.getField(this, 3);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.auction_id === "string" && this.auction_id.length)
|
||||
writer.writeString(1, this.auction_id);
|
||||
if (typeof this.reveal === "string" && this.reveal.length)
|
||||
writer.writeString(2, this.reveal);
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(3, this.signer);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgRevealBid.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgRevealBid = MsgRevealBid;
|
||||
class MsgCommitBidResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set bid(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgCommitBidResponse({});
|
||||
if (data.bid != null) {
|
||||
message.bid = dependency_4.vulcanize.auction.v1beta1.Bid.fromObject(data.bid);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.bid != null) {
|
||||
data.bid = this.bid.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.bid !== undefined)
|
||||
writer.writeMessage(1, this.bid, () => this.bid.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCommitBidResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCommitBidResponse = MsgCommitBidResponse;
|
||||
class MsgRevealBidResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set auction(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgRevealBidResponse({});
|
||||
if (data.auction != null) {
|
||||
message.auction = dependency_4.vulcanize.auction.v1beta1.Auction.fromObject(data.auction);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auction != null) {
|
||||
data.auction = this.auction.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auction !== undefined)
|
||||
writer.writeMessage(1, this.auction, () => this.auction.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgRevealBidResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgRevealBidResponse = MsgRevealBidResponse;
|
||||
})(v1beta1 = auction.v1beta1 || (auction.v1beta1 = {}));
|
||||
})(auction = vulcanize.auction || (vulcanize.auction = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
284
dist/proto/vulcanize/auction/v1beta1/types.d.ts
vendored
Normal file
284
dist/proto/vulcanize/auction/v1beta1/types.d.ts
vendored
Normal file
@ -0,0 +1,284 @@
|
||||
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 declare namespace vulcanize.auction.v1beta1 {
|
||||
class Params extends pb_1.Message {
|
||||
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;
|
||||
});
|
||||
get commits_duration(): dependency_2.google.protobuf.Duration;
|
||||
set commits_duration(value: dependency_2.google.protobuf.Duration);
|
||||
get reveals_duration(): dependency_2.google.protobuf.Duration;
|
||||
set reveals_duration(value: dependency_2.google.protobuf.Duration);
|
||||
get commit_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get reveal_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get minimum_bid(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
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;
|
||||
toObject(): {
|
||||
commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Params;
|
||||
}
|
||||
class Auction extends pb_1.Message {
|
||||
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;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get status(): string;
|
||||
set status(value: string);
|
||||
get owner_address(): string;
|
||||
set owner_address(value: string);
|
||||
get create_time(): dependency_3.google.protobuf.Timestamp;
|
||||
set create_time(value: dependency_3.google.protobuf.Timestamp);
|
||||
get commits_end_time(): dependency_3.google.protobuf.Timestamp;
|
||||
set commits_end_time(value: dependency_3.google.protobuf.Timestamp);
|
||||
get reveals_end_time(): dependency_3.google.protobuf.Timestamp;
|
||||
set reveals_end_time(value: dependency_3.google.protobuf.Timestamp);
|
||||
get commit_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get reveal_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get minimum_bid(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get winner_address(): string;
|
||||
set winner_address(value: string);
|
||||
get winning_bid(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set winning_bid(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get winning_price(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set winning_price(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
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;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Auction;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Auction;
|
||||
}
|
||||
class Auctions extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auctions?: Auction[];
|
||||
});
|
||||
get auctions(): Auction[];
|
||||
set auctions(value: Auction[]);
|
||||
static fromObject(data: {
|
||||
auctions?: ReturnType<typeof Auction.prototype.toObject>[];
|
||||
}): Auctions;
|
||||
toObject(): {
|
||||
auctions?: {
|
||||
id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
create_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commits_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveals_end_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winner_address?: string | undefined;
|
||||
winning_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
winning_price?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Auctions;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Auctions;
|
||||
}
|
||||
class Bid extends pb_1.Message {
|
||||
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;
|
||||
});
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
get bidder_address(): string;
|
||||
set bidder_address(value: string);
|
||||
get status(): string;
|
||||
set status(value: string);
|
||||
get commit_hash(): string;
|
||||
set commit_hash(value: string);
|
||||
get commit_time(): dependency_3.google.protobuf.Timestamp;
|
||||
set commit_time(value: dependency_3.google.protobuf.Timestamp);
|
||||
get commit_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get reveal_time(): dependency_3.google.protobuf.Timestamp;
|
||||
set reveal_time(value: dependency_3.google.protobuf.Timestamp);
|
||||
get reveal_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get bid_amount(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set bid_amount(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
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;
|
||||
toObject(): {
|
||||
auction_id?: string | undefined;
|
||||
bidder_address?: string | undefined;
|
||||
status?: string | undefined;
|
||||
commit_hash?: string | undefined;
|
||||
commit_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
reveal_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
bid_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bid;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Bid;
|
||||
}
|
||||
}
|
735
dist/proto/vulcanize/auction/v1beta1/types.js
vendored
Normal file
735
dist/proto/vulcanize/auction/v1beta1/types.js
vendored
Normal file
@ -0,0 +1,735 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./../../../google/protobuf/duration"));
|
||||
const dependency_3 = __importStar(require("./../../../google/protobuf/timestamp"));
|
||||
const dependency_4 = __importStar(require("./../../../cosmos/base/v1beta1/coin"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var auction;
|
||||
(function (auction) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class Params extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set commits_duration(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get reveals_duration() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Duration, 2);
|
||||
}
|
||||
set reveals_duration(value) {
|
||||
pb_1.Message.setWrapperField(this, 2, value);
|
||||
}
|
||||
get commit_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 3);
|
||||
}
|
||||
set commit_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 3, value);
|
||||
}
|
||||
get reveal_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 4);
|
||||
}
|
||||
set reveal_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 4, value);
|
||||
}
|
||||
get minimum_bid() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 5);
|
||||
}
|
||||
set minimum_bid(value) {
|
||||
pb_1.Message.setWrapperField(this, 5, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.commits_duration !== undefined)
|
||||
writer.writeMessage(1, this.commits_duration, () => this.commits_duration.serialize(writer));
|
||||
if (this.reveals_duration !== undefined)
|
||||
writer.writeMessage(2, this.reveals_duration, () => this.reveals_duration.serialize(writer));
|
||||
if (this.commit_fee !== undefined)
|
||||
writer.writeMessage(3, this.commit_fee, () => this.commit_fee.serialize(writer));
|
||||
if (this.reveal_fee !== undefined)
|
||||
writer.writeMessage(4, this.reveal_fee, () => this.reveal_fee.serialize(writer));
|
||||
if (this.minimum_bid !== undefined)
|
||||
writer.writeMessage(5, this.minimum_bid, () => this.minimum_bid.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Params.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Params = Params;
|
||||
class Auction extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("id" in data && data.id != undefined) {
|
||||
this.id = data.id;
|
||||
}
|
||||
if ("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.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get status() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set status(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get owner_address() {
|
||||
return pb_1.Message.getField(this, 3);
|
||||
}
|
||||
set owner_address(value) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
get create_time() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 4);
|
||||
}
|
||||
set create_time(value) {
|
||||
pb_1.Message.setWrapperField(this, 4, value);
|
||||
}
|
||||
get commits_end_time() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5);
|
||||
}
|
||||
set commits_end_time(value) {
|
||||
pb_1.Message.setWrapperField(this, 5, value);
|
||||
}
|
||||
get reveals_end_time() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 6);
|
||||
}
|
||||
set reveals_end_time(value) {
|
||||
pb_1.Message.setWrapperField(this, 6, value);
|
||||
}
|
||||
get commit_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 7);
|
||||
}
|
||||
set commit_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 7, value);
|
||||
}
|
||||
get reveal_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 8);
|
||||
}
|
||||
set reveal_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 8, value);
|
||||
}
|
||||
get minimum_bid() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9);
|
||||
}
|
||||
set minimum_bid(value) {
|
||||
pb_1.Message.setWrapperField(this, 9, value);
|
||||
}
|
||||
get winner_address() {
|
||||
return pb_1.Message.getField(this, 10);
|
||||
}
|
||||
set winner_address(value) {
|
||||
pb_1.Message.setField(this, 10, value);
|
||||
}
|
||||
get winning_bid() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 11);
|
||||
}
|
||||
set winning_bid(value) {
|
||||
pb_1.Message.setWrapperField(this, 11, value);
|
||||
}
|
||||
get winning_price() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 12);
|
||||
}
|
||||
set winning_price(value) {
|
||||
pb_1.Message.setWrapperField(this, 12, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (typeof this.status === "string" && this.status.length)
|
||||
writer.writeString(2, this.status);
|
||||
if (typeof this.owner_address === "string" && this.owner_address.length)
|
||||
writer.writeString(3, this.owner_address);
|
||||
if (this.create_time !== undefined)
|
||||
writer.writeMessage(4, this.create_time, () => this.create_time.serialize(writer));
|
||||
if (this.commits_end_time !== undefined)
|
||||
writer.writeMessage(5, this.commits_end_time, () => this.commits_end_time.serialize(writer));
|
||||
if (this.reveals_end_time !== undefined)
|
||||
writer.writeMessage(6, this.reveals_end_time, () => this.reveals_end_time.serialize(writer));
|
||||
if (this.commit_fee !== undefined)
|
||||
writer.writeMessage(7, this.commit_fee, () => this.commit_fee.serialize(writer));
|
||||
if (this.reveal_fee !== undefined)
|
||||
writer.writeMessage(8, this.reveal_fee, () => this.reveal_fee.serialize(writer));
|
||||
if (this.minimum_bid !== undefined)
|
||||
writer.writeMessage(9, this.minimum_bid, () => this.minimum_bid.serialize(writer));
|
||||
if (typeof this.winner_address === "string" && this.winner_address.length)
|
||||
writer.writeString(10, this.winner_address);
|
||||
if (this.winning_bid !== undefined)
|
||||
writer.writeMessage(11, this.winning_bid, () => this.winning_bid.serialize(writer));
|
||||
if (this.winning_price !== undefined)
|
||||
writer.writeMessage(12, this.winning_price, () => this.winning_price.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Auction.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Auction = Auction;
|
||||
class Auctions extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], []);
|
||||
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);
|
||||
}
|
||||
set auctions(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new Auctions({});
|
||||
if (data.auctions != null) {
|
||||
message.auctions = data.auctions.map(item => Auction.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.auctions != null) {
|
||||
data.auctions = this.auctions.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.auctions !== undefined)
|
||||
writer.writeRepeatedMessage(1, this.auctions, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Auctions.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Auctions = Auctions;
|
||||
class Bid extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("auction_id" in data && data.auction_id != undefined) {
|
||||
this.auction_id = data.auction_id;
|
||||
}
|
||||
if ("bidder_address" in data && data.bidder_address != undefined) {
|
||||
this.bidder_address = data.bidder_address;
|
||||
}
|
||||
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.getField(this, 1);
|
||||
}
|
||||
set auction_id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get bidder_address() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set bidder_address(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get status() {
|
||||
return pb_1.Message.getField(this, 3);
|
||||
}
|
||||
set status(value) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
get commit_hash() {
|
||||
return pb_1.Message.getField(this, 4);
|
||||
}
|
||||
set commit_hash(value) {
|
||||
pb_1.Message.setField(this, 4, value);
|
||||
}
|
||||
get commit_time() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 5);
|
||||
}
|
||||
set commit_time(value) {
|
||||
pb_1.Message.setWrapperField(this, 5, value);
|
||||
}
|
||||
get commit_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 6);
|
||||
}
|
||||
set commit_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 6, value);
|
||||
}
|
||||
get reveal_time() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Timestamp, 7);
|
||||
}
|
||||
set reveal_time(value) {
|
||||
pb_1.Message.setWrapperField(this, 7, value);
|
||||
}
|
||||
get reveal_fee() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 8);
|
||||
}
|
||||
set reveal_fee(value) {
|
||||
pb_1.Message.setWrapperField(this, 8, value);
|
||||
}
|
||||
get bid_amount() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.v1beta1.Coin, 9);
|
||||
}
|
||||
set bid_amount(value) {
|
||||
pb_1.Message.setWrapperField(this, 9, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.auction_id === "string" && this.auction_id.length)
|
||||
writer.writeString(1, this.auction_id);
|
||||
if (typeof this.bidder_address === "string" && this.bidder_address.length)
|
||||
writer.writeString(2, this.bidder_address);
|
||||
if (typeof this.status === "string" && this.status.length)
|
||||
writer.writeString(3, this.status);
|
||||
if (typeof this.commit_hash === "string" && this.commit_hash.length)
|
||||
writer.writeString(4, this.commit_hash);
|
||||
if (this.commit_time !== undefined)
|
||||
writer.writeMessage(5, this.commit_time, () => this.commit_time.serialize(writer));
|
||||
if (this.commit_fee !== undefined)
|
||||
writer.writeMessage(6, this.commit_fee, () => this.commit_fee.serialize(writer));
|
||||
if (this.reveal_time !== undefined)
|
||||
writer.writeMessage(7, this.reveal_time, () => this.reveal_time.serialize(writer));
|
||||
if (this.reveal_fee !== undefined)
|
||||
writer.writeMessage(8, this.reveal_fee, () => this.reveal_fee.serialize(writer));
|
||||
if (this.bid_amount !== undefined)
|
||||
writer.writeMessage(9, this.bid_amount, () => this.bid_amount.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Bid.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Bid = Bid;
|
||||
})(v1beta1 = auction.v1beta1 || (auction.v1beta1 = {}));
|
||||
})(auction = vulcanize.auction || (vulcanize.auction = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
56
dist/proto/vulcanize/bond/v1beta1/bond.d.ts
vendored
Normal file
56
dist/proto/vulcanize/bond/v1beta1/bond.d.ts
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.bond.v1beta1 {
|
||||
class Params extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
max_bond_amount?: dependency_2.cosmos.base.v1beta1.Coin;
|
||||
});
|
||||
get max_bond_amount(): dependency_2.cosmos.base.v1beta1.Coin;
|
||||
set max_bond_amount(value: dependency_2.cosmos.base.v1beta1.Coin);
|
||||
static fromObject(data: {
|
||||
max_bond_amount?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
||||
}): Params;
|
||||
toObject(): {
|
||||
max_bond_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Params;
|
||||
}
|
||||
class Bond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
owner?: string;
|
||||
balance?: dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get owner(): string;
|
||||
set owner(value: string);
|
||||
get balance(): dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
set balance(value: dependency_2.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
owner?: string;
|
||||
balance?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): Bond;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
owner?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Bond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Bond;
|
||||
}
|
||||
}
|
195
dist/proto/vulcanize/bond/v1beta1/bond.js
vendored
Normal file
195
dist/proto/vulcanize/bond/v1beta1/bond.js
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./../../../cosmos/base/v1beta1/coin"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var bond;
|
||||
(function (bond) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class Params extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set max_bond_amount(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.max_bond_amount != null) {
|
||||
data.max_bond_amount = this.max_bond_amount.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.max_bond_amount !== undefined)
|
||||
writer.writeMessage(1, this.max_bond_amount, () => this.max_bond_amount.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Params.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Params = Params;
|
||||
class Bond extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], []);
|
||||
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.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get owner() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set owner(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get balance() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3);
|
||||
}
|
||||
set balance(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (typeof this.owner === "string" && this.owner.length)
|
||||
writer.writeString(2, this.owner);
|
||||
if (this.balance !== undefined)
|
||||
writer.writeRepeatedMessage(3, this.balance, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return Bond.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.Bond = Bond;
|
||||
})(v1beta1 = bond.v1beta1 || (bond.v1beta1 = {}));
|
||||
})(bond = vulcanize.bond || (vulcanize.bond = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
39
dist/proto/vulcanize/bond/v1beta1/genesis.d.ts
vendored
Normal file
39
dist/proto/vulcanize/bond/v1beta1/genesis.d.ts
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
import * as dependency_2 from "./bond";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.bond.v1beta1 {
|
||||
class GenesisState extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
params?: dependency_2.vulcanize.bond.v1beta1.Params;
|
||||
bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[];
|
||||
});
|
||||
get params(): dependency_2.vulcanize.bond.v1beta1.Params;
|
||||
set params(value: dependency_2.vulcanize.bond.v1beta1.Params);
|
||||
get bonds(): dependency_2.vulcanize.bond.v1beta1.Bond[];
|
||||
set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]);
|
||||
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;
|
||||
toObject(): {
|
||||
params?: {
|
||||
max_bond_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
bonds?: {
|
||||
id?: string | undefined;
|
||||
owner?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): GenesisState;
|
||||
}
|
||||
}
|
116
dist/proto/vulcanize/bond/v1beta1/genesis.js
vendored
Normal file
116
dist/proto/vulcanize/bond/v1beta1/genesis.js
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./bond"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var bond;
|
||||
(function (bond) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class GenesisState extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
|
||||
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);
|
||||
}
|
||||
set params(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get bonds() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.bond.v1beta1.Bond, 2);
|
||||
}
|
||||
set bonds(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.params != null) {
|
||||
data.params = this.params.toObject();
|
||||
}
|
||||
if (this.bonds != null) {
|
||||
data.bonds = this.bonds.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.params !== undefined)
|
||||
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
|
||||
if (this.bonds !== undefined)
|
||||
writer.writeRepeatedMessage(2, this.bonds, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return GenesisState.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.GenesisState = GenesisState;
|
||||
})(v1beta1 = bond.v1beta1 || (bond.v1beta1 = {}));
|
||||
})(bond = vulcanize.bond || (vulcanize.bond = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
229
dist/proto/vulcanize/bond/v1beta1/query.d.ts
vendored
Normal file
229
dist/proto/vulcanize/bond/v1beta1/query.d.ts
vendored
Normal file
@ -0,0 +1,229 @@
|
||||
import * as dependency_2 from "./bond";
|
||||
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 declare namespace vulcanize.bond.v1beta1 {
|
||||
class QueryParamsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): QueryParamsRequest;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryParamsRequest;
|
||||
}
|
||||
class QueryParamsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
params?: dependency_2.vulcanize.bond.v1beta1.Params;
|
||||
});
|
||||
get params(): dependency_2.vulcanize.bond.v1beta1.Params;
|
||||
set params(value: dependency_2.vulcanize.bond.v1beta1.Params);
|
||||
static fromObject(data: {
|
||||
params?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Params.prototype.toObject>;
|
||||
}): QueryParamsResponse;
|
||||
toObject(): {
|
||||
params?: {
|
||||
max_bond_amount?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryParamsResponse;
|
||||
}
|
||||
class QueryGetBondsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
pagination?: dependency_4.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get pagination(): dependency_4.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): QueryGetBondsRequest;
|
||||
toObject(): {
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondsRequest;
|
||||
}
|
||||
class QueryGetBondsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[];
|
||||
pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get bonds(): dependency_2.vulcanize.bond.v1beta1.Bond[];
|
||||
set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]);
|
||||
get pagination(): dependency_4.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse);
|
||||
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;
|
||||
toObject(): {
|
||||
bonds?: {
|
||||
id?: string | undefined;
|
||||
owner?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondsResponse;
|
||||
}
|
||||
class QueryGetBondByIdRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
}): QueryGetBondByIdRequest;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondByIdRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondByIdRequest;
|
||||
}
|
||||
class QueryGetBondByIdResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bond?: dependency_2.vulcanize.bond.v1beta1.Bond;
|
||||
});
|
||||
get bond(): dependency_2.vulcanize.bond.v1beta1.Bond;
|
||||
set bond(value: dependency_2.vulcanize.bond.v1beta1.Bond);
|
||||
static fromObject(data: {
|
||||
bond?: ReturnType<typeof dependency_2.vulcanize.bond.v1beta1.Bond.prototype.toObject>;
|
||||
}): QueryGetBondByIdResponse;
|
||||
toObject(): {
|
||||
bond?: {
|
||||
id?: string | undefined;
|
||||
owner?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondByIdResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondByIdResponse;
|
||||
}
|
||||
class QueryGetBondsByOwnerRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
owner?: string;
|
||||
pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get owner(): string;
|
||||
set owner(value: string);
|
||||
get pagination(): dependency_4.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse);
|
||||
static fromObject(data: {
|
||||
owner?: string;
|
||||
pagination?: ReturnType<typeof dependency_4.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
|
||||
}): QueryGetBondsByOwnerRequest;
|
||||
toObject(): {
|
||||
owner?: string | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsByOwnerRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondsByOwnerRequest;
|
||||
}
|
||||
class QueryGetBondsByOwnerResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bonds?: dependency_2.vulcanize.bond.v1beta1.Bond[];
|
||||
pagination?: dependency_4.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get bonds(): dependency_2.vulcanize.bond.v1beta1.Bond[];
|
||||
set bonds(value: dependency_2.vulcanize.bond.v1beta1.Bond[]);
|
||||
get pagination(): dependency_4.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_4.cosmos.base.query.v1beta1.PageResponse);
|
||||
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;
|
||||
toObject(): {
|
||||
bonds?: {
|
||||
id?: string | undefined;
|
||||
owner?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondsByOwnerResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondsByOwnerResponse;
|
||||
}
|
||||
class QueryGetBondModuleBalanceRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): QueryGetBondModuleBalanceRequest;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondModuleBalanceRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondModuleBalanceRequest;
|
||||
}
|
||||
class QueryGetBondModuleBalanceResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
balance?: dependency_5.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get balance(): dependency_5.cosmos.base.v1beta1.Coin[];
|
||||
set balance(value: dependency_5.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
balance?: ReturnType<typeof dependency_5.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): QueryGetBondModuleBalanceResponse;
|
||||
toObject(): {
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetBondModuleBalanceResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetBondModuleBalanceResponse;
|
||||
}
|
||||
}
|
647
dist/proto/vulcanize/bond/v1beta1/query.js
vendored
Normal file
647
dist/proto/vulcanize/bond/v1beta1/query.js
vendored
Normal file
@ -0,0 +1,647 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./bond"));
|
||||
const dependency_4 = __importStar(require("./../../../cosmos/base/query/v1beta1/pagination"));
|
||||
const dependency_5 = __importStar(require("./../../../cosmos/base/v1beta1/coin"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var bond;
|
||||
(function (bond) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class QueryParamsRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryParamsRequest({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryParamsRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryParamsRequest = QueryParamsRequest;
|
||||
class QueryParamsResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set params(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryParamsResponse({});
|
||||
if (data.params != null) {
|
||||
message.params = dependency_2.vulcanize.bond.v1beta1.Params.fromObject(data.params);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.params != null) {
|
||||
data.params = this.params.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.params !== undefined)
|
||||
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryParamsResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryParamsResponse = QueryParamsResponse;
|
||||
class QueryGetBondsRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set pagination(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.pagination != null) {
|
||||
data.pagination = this.pagination.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.pagination !== undefined)
|
||||
writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondsRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondsRequest = QueryGetBondsRequest;
|
||||
class QueryGetBondsResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], []);
|
||||
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);
|
||||
}
|
||||
set bonds(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
get pagination() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2);
|
||||
}
|
||||
set pagination(value) {
|
||||
pb_1.Message.setWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.bonds != null) {
|
||||
data.bonds = this.bonds.map((item) => item.toObject());
|
||||
}
|
||||
if (this.pagination != null) {
|
||||
data.pagination = this.pagination.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.bonds !== undefined)
|
||||
writer.writeRepeatedMessage(1, this.bonds, (item) => item.serialize(writer));
|
||||
if (this.pagination !== undefined)
|
||||
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondsResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondsResponse = QueryGetBondsResponse;
|
||||
class QueryGetBondByIdRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("id" in data && data.id != undefined) {
|
||||
this.id = data.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryGetBondByIdRequest({});
|
||||
if (data.id != null) {
|
||||
message.id = data.id;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondByIdRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondByIdRequest = QueryGetBondByIdRequest;
|
||||
class QueryGetBondByIdResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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);
|
||||
}
|
||||
set bond(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryGetBondByIdResponse({});
|
||||
if (data.bond != null) {
|
||||
message.bond = dependency_2.vulcanize.bond.v1beta1.Bond.fromObject(data.bond);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.bond != null) {
|
||||
data.bond = this.bond.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.bond !== undefined)
|
||||
writer.writeMessage(1, this.bond, () => this.bond.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondByIdResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondByIdResponse = QueryGetBondByIdResponse;
|
||||
class QueryGetBondsByOwnerRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
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.getField(this, 1);
|
||||
}
|
||||
set owner(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get pagination() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2);
|
||||
}
|
||||
set pagination(value) {
|
||||
pb_1.Message.setWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.owner != null) {
|
||||
data.owner = this.owner;
|
||||
}
|
||||
if (this.pagination != null) {
|
||||
data.pagination = this.pagination.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.owner === "string" && this.owner.length)
|
||||
writer.writeString(1, this.owner);
|
||||
if (this.pagination !== undefined)
|
||||
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondsByOwnerRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondsByOwnerRequest = QueryGetBondsByOwnerRequest;
|
||||
class QueryGetBondsByOwnerResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], []);
|
||||
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);
|
||||
}
|
||||
set bonds(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||
}
|
||||
get pagination() {
|
||||
return pb_1.Message.getWrapperField(this, dependency_4.cosmos.base.query.v1beta1.PageResponse, 2);
|
||||
}
|
||||
set pagination(value) {
|
||||
pb_1.Message.setWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.bonds != null) {
|
||||
data.bonds = this.bonds.map((item) => item.toObject());
|
||||
}
|
||||
if (this.pagination != null) {
|
||||
data.pagination = this.pagination.toObject();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.bonds !== undefined)
|
||||
writer.writeRepeatedMessage(1, this.bonds, (item) => item.serialize(writer));
|
||||
if (this.pagination !== undefined)
|
||||
writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondsByOwnerResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondsByOwnerResponse = QueryGetBondsByOwnerResponse;
|
||||
class QueryGetBondModuleBalanceRequest extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new QueryGetBondModuleBalanceRequest({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondModuleBalanceRequest.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondModuleBalanceRequest = QueryGetBondModuleBalanceRequest;
|
||||
class QueryGetBondModuleBalanceResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
|
||||
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);
|
||||
}
|
||||
set balance(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.balance != null) {
|
||||
data.balance = this.balance.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.balance !== undefined)
|
||||
writer.writeRepeatedMessage(2, this.balance, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return QueryGetBondModuleBalanceResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.QueryGetBondModuleBalanceResponse = QueryGetBondModuleBalanceResponse;
|
||||
})(v1beta1 = bond.v1beta1 || (bond.v1beta1 = {}));
|
||||
})(bond = vulcanize.bond || (vulcanize.bond = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
163
dist/proto/vulcanize/bond/v1beta1/tx.d.ts
vendored
Normal file
163
dist/proto/vulcanize/bond/v1beta1/tx.d.ts
vendored
Normal file
@ -0,0 +1,163 @@
|
||||
import * as dependency_2 from "./../../../cosmos/base/v1beta1/coin";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.bond.v1beta1 {
|
||||
class MsgCreateBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
signer?: string;
|
||||
coins?: dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
get coins(): dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
signer?: string;
|
||||
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): MsgCreateBond;
|
||||
toObject(): {
|
||||
signer?: string | undefined;
|
||||
coins?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCreateBond;
|
||||
}
|
||||
class MsgCreateBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
}): MsgCreateBondResponse;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCreateBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCreateBondResponse;
|
||||
}
|
||||
class MsgRefillBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
signer?: string;
|
||||
coins?: dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
get coins(): dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
signer?: string;
|
||||
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): MsgRefillBond;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
coins?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRefillBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgRefillBond;
|
||||
}
|
||||
class MsgRefillBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgRefillBondResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRefillBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgRefillBondResponse;
|
||||
}
|
||||
class MsgWithdrawBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
signer?: string;
|
||||
coins?: dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
get coins(): dependency_2.cosmos.base.v1beta1.Coin[];
|
||||
set coins(value: dependency_2.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
signer?: string;
|
||||
coins?: ReturnType<typeof dependency_2.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): MsgWithdrawBond;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
coins?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgWithdrawBond;
|
||||
}
|
||||
class MsgWithdrawBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgWithdrawBondResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgWithdrawBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgWithdrawBondResponse;
|
||||
}
|
||||
class MsgCancelBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
signer?: string;
|
||||
}): MsgCancelBond;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCancelBond;
|
||||
}
|
||||
class MsgCancelBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgCancelBondResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgCancelBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgCancelBondResponse;
|
||||
}
|
||||
}
|
566
dist/proto/vulcanize/bond/v1beta1/tx.js
vendored
Normal file
566
dist/proto/vulcanize/bond/v1beta1/tx.js
vendored
Normal file
@ -0,0 +1,566 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./../../../cosmos/base/v1beta1/coin"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var bond;
|
||||
(function (bond) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class MsgCreateBond extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], []);
|
||||
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.getField(this, 1);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get coins() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 2);
|
||||
}
|
||||
set coins(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.signer != null) {
|
||||
data.signer = this.signer;
|
||||
}
|
||||
if (this.coins != null) {
|
||||
data.coins = this.coins.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(1, this.signer);
|
||||
if (this.coins !== undefined)
|
||||
writer.writeRepeatedMessage(2, this.coins, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCreateBond.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCreateBond = MsgCreateBond;
|
||||
class MsgCreateBondResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("id" in data && data.id != undefined) {
|
||||
this.id = data.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgCreateBondResponse({});
|
||||
if (data.id != null) {
|
||||
message.id = data.id;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCreateBondResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCreateBondResponse = MsgCreateBondResponse;
|
||||
class MsgRefillBond extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], []);
|
||||
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.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get signer() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get coins() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3);
|
||||
}
|
||||
set coins(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(2, this.signer);
|
||||
if (this.coins !== undefined)
|
||||
writer.writeRepeatedMessage(3, this.coins, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgRefillBond.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgRefillBond = MsgRefillBond;
|
||||
class MsgRefillBondResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgRefillBondResponse({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgRefillBondResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgRefillBondResponse = MsgRefillBondResponse;
|
||||
class MsgWithdrawBond extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], []);
|
||||
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.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get signer() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get coins() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.cosmos.base.v1beta1.Coin, 3);
|
||||
}
|
||||
set coins(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
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) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(2, this.signer);
|
||||
if (this.coins !== undefined)
|
||||
writer.writeRepeatedMessage(3, this.coins, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgWithdrawBond.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgWithdrawBond = MsgWithdrawBond;
|
||||
class MsgWithdrawBondResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgWithdrawBondResponse({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgWithdrawBondResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgWithdrawBondResponse = MsgWithdrawBondResponse;
|
||||
class MsgCancelBond extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("id" in data && data.id != undefined) {
|
||||
this.id = data.id;
|
||||
}
|
||||
if ("signer" in data && data.signer != undefined) {
|
||||
this.signer = data.signer;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
return pb_1.Message.getField(this, 1);
|
||||
}
|
||||
set id(value) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get signer() {
|
||||
return pb_1.Message.getField(this, 2);
|
||||
}
|
||||
set signer(value) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
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 = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
}
|
||||
if (this.signer != null) {
|
||||
data.signer = this.signer;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (typeof this.id === "string" && this.id.length)
|
||||
writer.writeString(1, this.id);
|
||||
if (typeof this.signer === "string" && this.signer.length)
|
||||
writer.writeString(2, this.signer);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCancelBond.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCancelBond = MsgCancelBond;
|
||||
class MsgCancelBondResponse extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new MsgCancelBondResponse({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return MsgCancelBondResponse.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.MsgCancelBondResponse = MsgCancelBondResponse;
|
||||
})(v1beta1 = bond.v1beta1 || (bond.v1beta1 = {}));
|
||||
})(bond = vulcanize.bond || (vulcanize.bond = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
114
dist/proto/vulcanize/nameservice/v1beta1/genesis.d.ts
vendored
Normal file
114
dist/proto/vulcanize/nameservice/v1beta1/genesis.d.ts
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
import * as dependency_2 from "./nameservice";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.nameservice.v1beta1 {
|
||||
class GenesisState extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
params?: dependency_2.vulcanize.nameservice.v1beta1.Params;
|
||||
records?: dependency_2.vulcanize.nameservice.v1beta1.Record[];
|
||||
authorities?: dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry[];
|
||||
names?: dependency_2.vulcanize.nameservice.v1beta1.NameEntry[];
|
||||
});
|
||||
get params(): dependency_2.vulcanize.nameservice.v1beta1.Params;
|
||||
set params(value: dependency_2.vulcanize.nameservice.v1beta1.Params);
|
||||
get records(): dependency_2.vulcanize.nameservice.v1beta1.Record[];
|
||||
set records(value: dependency_2.vulcanize.nameservice.v1beta1.Record[]);
|
||||
get authorities(): dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry[];
|
||||
set authorities(value: dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry[]);
|
||||
get names(): dependency_2.vulcanize.nameservice.v1beta1.NameEntry[];
|
||||
set names(value: dependency_2.vulcanize.nameservice.v1beta1.NameEntry[]);
|
||||
static fromObject(data: {
|
||||
params?: ReturnType<typeof dependency_2.vulcanize.nameservice.v1beta1.Params.prototype.toObject>;
|
||||
records?: ReturnType<typeof dependency_2.vulcanize.nameservice.v1beta1.Record.prototype.toObject>[];
|
||||
authorities?: ReturnType<typeof dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry.prototype.toObject>[];
|
||||
names?: ReturnType<typeof dependency_2.vulcanize.nameservice.v1beta1.NameEntry.prototype.toObject>[];
|
||||
}): GenesisState;
|
||||
toObject(): {
|
||||
params?: {
|
||||
record_rent?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
record_rent_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_rent?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_rent_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_grace_period?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_enabled?: boolean | undefined;
|
||||
authority_auction_commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_auction_reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_auction_minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
records?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
}[] | undefined;
|
||||
authorities?: {
|
||||
name?: string | undefined;
|
||||
entry?: {
|
||||
owner_public_key?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
height?: number | undefined;
|
||||
status?: string | undefined;
|
||||
auction_id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
expiry_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
names?: {
|
||||
name?: string | undefined;
|
||||
entry?: {
|
||||
latest?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
} | undefined;
|
||||
history?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GenesisState;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): GenesisState;
|
||||
}
|
||||
}
|
156
dist/proto/vulcanize/nameservice/v1beta1/genesis.js
vendored
Normal file
156
dist/proto/vulcanize/nameservice/v1beta1/genesis.js
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.vulcanize = void 0;
|
||||
const dependency_2 = __importStar(require("./nameservice"));
|
||||
const pb_1 = __importStar(require("google-protobuf"));
|
||||
var vulcanize;
|
||||
(function (vulcanize) {
|
||||
var nameservice;
|
||||
(function (nameservice) {
|
||||
var v1beta1;
|
||||
(function (v1beta1) {
|
||||
class GenesisState extends pb_1.Message {
|
||||
constructor(data) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4], []);
|
||||
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.nameservice.v1beta1.Params, 1);
|
||||
}
|
||||
set params(value) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get records() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.nameservice.v1beta1.Record, 2);
|
||||
}
|
||||
set records(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
get authorities() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry, 3);
|
||||
}
|
||||
set authorities(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||
}
|
||||
get names() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_2.vulcanize.nameservice.v1beta1.NameEntry, 4);
|
||||
}
|
||||
set names(value) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
||||
}
|
||||
static fromObject(data) {
|
||||
const message = new GenesisState({});
|
||||
if (data.params != null) {
|
||||
message.params = dependency_2.vulcanize.nameservice.v1beta1.Params.fromObject(data.params);
|
||||
}
|
||||
if (data.records != null) {
|
||||
message.records = data.records.map(item => dependency_2.vulcanize.nameservice.v1beta1.Record.fromObject(item));
|
||||
}
|
||||
if (data.authorities != null) {
|
||||
message.authorities = data.authorities.map(item => dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry.fromObject(item));
|
||||
}
|
||||
if (data.names != null) {
|
||||
message.names = data.names.map(item => dependency_2.vulcanize.nameservice.v1beta1.NameEntry.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data = {};
|
||||
if (this.params != null) {
|
||||
data.params = this.params.toObject();
|
||||
}
|
||||
if (this.records != null) {
|
||||
data.records = this.records.map((item) => item.toObject());
|
||||
}
|
||||
if (this.authorities != null) {
|
||||
data.authorities = this.authorities.map((item) => item.toObject());
|
||||
}
|
||||
if (this.names != null) {
|
||||
data.names = this.names.map((item) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(w) {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.params !== undefined)
|
||||
writer.writeMessage(1, this.params, () => this.params.serialize(writer));
|
||||
if (this.records !== undefined)
|
||||
writer.writeRepeatedMessage(2, this.records, (item) => item.serialize(writer));
|
||||
if (this.authorities !== undefined)
|
||||
writer.writeRepeatedMessage(3, this.authorities, (item) => item.serialize(writer));
|
||||
if (this.names !== undefined)
|
||||
writer.writeRepeatedMessage(4, this.names, (item) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes) {
|
||||
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.nameservice.v1beta1.Params.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_2.vulcanize.nameservice.v1beta1.Record.deserialize(reader), dependency_2.vulcanize.nameservice.v1beta1.Record));
|
||||
break;
|
||||
case 3:
|
||||
reader.readMessage(message.authorities, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry.deserialize(reader), dependency_2.vulcanize.nameservice.v1beta1.AuthorityEntry));
|
||||
break;
|
||||
case 4:
|
||||
reader.readMessage(message.names, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_2.vulcanize.nameservice.v1beta1.NameEntry.deserialize(reader), dependency_2.vulcanize.nameservice.v1beta1.NameEntry));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary() {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes) {
|
||||
return GenesisState.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
v1beta1.GenesisState = GenesisState;
|
||||
})(v1beta1 = nameservice.v1beta1 || (nameservice.v1beta1 = {}));
|
||||
})(nameservice = vulcanize.nameservice || (vulcanize.nameservice = {}));
|
||||
})(vulcanize = exports.vulcanize || (exports.vulcanize = {}));
|
423
dist/proto/vulcanize/nameservice/v1beta1/nameservice.d.ts
vendored
Normal file
423
dist/proto/vulcanize/nameservice/v1beta1/nameservice.d.ts
vendored
Normal file
@ -0,0 +1,423 @@
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: vulcanize/nameservice/v1beta1/nameservice.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as dependency_1 from "./../../../google/protobuf/duration";
|
||||
import * as dependency_2 from "./../../../google/protobuf/timestamp";
|
||||
import * as dependency_4 from "./../../../cosmos/base/v1beta1/coin";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.nameservice.v1beta1 {
|
||||
class Params extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record_rent?: dependency_4.cosmos.base.v1beta1.Coin;
|
||||
record_rent_duration?: dependency_1.google.protobuf.Duration;
|
||||
authority_rent?: dependency_4.cosmos.base.v1beta1.Coin;
|
||||
authority_rent_duration?: dependency_1.google.protobuf.Duration;
|
||||
authority_grace_period?: dependency_1.google.protobuf.Duration;
|
||||
authority_auction_enabled?: boolean;
|
||||
authority_auction_commits_duration?: dependency_1.google.protobuf.Duration;
|
||||
authority_auction_reveals_duration?: dependency_1.google.protobuf.Duration;
|
||||
authority_auction_commit_fee?: dependency_4.cosmos.base.v1beta1.Coin;
|
||||
authority_auction_reveal_fee?: dependency_4.cosmos.base.v1beta1.Coin;
|
||||
authority_auction_minimum_bid?: dependency_4.cosmos.base.v1beta1.Coin;
|
||||
});
|
||||
get record_rent(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set record_rent(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get record_rent_duration(): dependency_1.google.protobuf.Duration;
|
||||
set record_rent_duration(value: dependency_1.google.protobuf.Duration);
|
||||
get authority_rent(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set authority_rent(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get authority_rent_duration(): dependency_1.google.protobuf.Duration;
|
||||
set authority_rent_duration(value: dependency_1.google.protobuf.Duration);
|
||||
get authority_grace_period(): dependency_1.google.protobuf.Duration;
|
||||
set authority_grace_period(value: dependency_1.google.protobuf.Duration);
|
||||
get authority_auction_enabled(): boolean;
|
||||
set authority_auction_enabled(value: boolean);
|
||||
get authority_auction_commits_duration(): dependency_1.google.protobuf.Duration;
|
||||
set authority_auction_commits_duration(value: dependency_1.google.protobuf.Duration);
|
||||
get authority_auction_reveals_duration(): dependency_1.google.protobuf.Duration;
|
||||
set authority_auction_reveals_duration(value: dependency_1.google.protobuf.Duration);
|
||||
get authority_auction_commit_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set authority_auction_commit_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get authority_auction_reveal_fee(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set authority_auction_reveal_fee(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
get authority_auction_minimum_bid(): dependency_4.cosmos.base.v1beta1.Coin;
|
||||
set authority_auction_minimum_bid(value: dependency_4.cosmos.base.v1beta1.Coin);
|
||||
static fromObject(data: {
|
||||
record_rent?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
||||
record_rent_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
||||
authority_rent?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
||||
authority_rent_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
||||
authority_grace_period?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
||||
authority_auction_enabled?: boolean;
|
||||
authority_auction_commits_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
||||
authority_auction_reveals_duration?: ReturnType<typeof dependency_1.google.protobuf.Duration.prototype.toObject>;
|
||||
authority_auction_commit_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
||||
authority_auction_reveal_fee?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
||||
authority_auction_minimum_bid?: ReturnType<typeof dependency_4.cosmos.base.v1beta1.Coin.prototype.toObject>;
|
||||
}): Params;
|
||||
toObject(): {
|
||||
record_rent?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
record_rent_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_rent?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_rent_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_grace_period?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_enabled?: boolean | undefined;
|
||||
authority_auction_commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_auction_reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_auction_minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Params;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Params;
|
||||
}
|
||||
class Record extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
bond_id?: string;
|
||||
create_time?: string;
|
||||
expiry_time?: string;
|
||||
deleted?: boolean;
|
||||
owners?: string[];
|
||||
attributes?: string;
|
||||
names?: string[];
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get bond_id(): string;
|
||||
set bond_id(value: string);
|
||||
get create_time(): string;
|
||||
set create_time(value: string);
|
||||
get expiry_time(): string;
|
||||
set expiry_time(value: string);
|
||||
get deleted(): boolean;
|
||||
set deleted(value: boolean);
|
||||
get owners(): string[];
|
||||
set owners(value: string[]);
|
||||
get attributes(): string;
|
||||
set attributes(value: string);
|
||||
get names(): string[];
|
||||
set names(value: string[]);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
bond_id?: string;
|
||||
create_time?: string;
|
||||
expiry_time?: string;
|
||||
deleted?: boolean;
|
||||
owners?: string[];
|
||||
attributes?: string;
|
||||
names?: string[];
|
||||
}): Record;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Record;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Record;
|
||||
}
|
||||
class AuthorityEntry extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name?: string;
|
||||
entry?: NameAuthority;
|
||||
});
|
||||
get name(): string;
|
||||
set name(value: string);
|
||||
get entry(): NameAuthority;
|
||||
set entry(value: NameAuthority);
|
||||
static fromObject(data: {
|
||||
name?: string;
|
||||
entry?: ReturnType<typeof NameAuthority.prototype.toObject>;
|
||||
}): AuthorityEntry;
|
||||
toObject(): {
|
||||
name?: string | undefined;
|
||||
entry?: {
|
||||
owner_public_key?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
height?: number | undefined;
|
||||
status?: string | undefined;
|
||||
auction_id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
expiry_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuthorityEntry;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuthorityEntry;
|
||||
}
|
||||
class NameAuthority extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
owner_public_key?: string;
|
||||
owner_address?: string;
|
||||
height?: number;
|
||||
status?: string;
|
||||
auction_id?: string;
|
||||
bond_id?: string;
|
||||
expiry_time?: dependency_2.google.protobuf.Timestamp;
|
||||
});
|
||||
get owner_public_key(): string;
|
||||
set owner_public_key(value: string);
|
||||
get owner_address(): string;
|
||||
set owner_address(value: string);
|
||||
get height(): number;
|
||||
set height(value: number);
|
||||
get status(): string;
|
||||
set status(value: string);
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
get bond_id(): string;
|
||||
set bond_id(value: string);
|
||||
get expiry_time(): dependency_2.google.protobuf.Timestamp;
|
||||
set expiry_time(value: dependency_2.google.protobuf.Timestamp);
|
||||
static fromObject(data: {
|
||||
owner_public_key?: string;
|
||||
owner_address?: string;
|
||||
height?: number;
|
||||
status?: string;
|
||||
auction_id?: string;
|
||||
bond_id?: string;
|
||||
expiry_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
||||
}): NameAuthority;
|
||||
toObject(): {
|
||||
owner_public_key?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
height?: number | undefined;
|
||||
status?: string | undefined;
|
||||
auction_id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
expiry_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameAuthority;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): NameAuthority;
|
||||
}
|
||||
class NameEntry extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name?: string;
|
||||
entry?: NameRecord;
|
||||
});
|
||||
get name(): string;
|
||||
set name(value: string);
|
||||
get entry(): NameRecord;
|
||||
set entry(value: NameRecord);
|
||||
static fromObject(data: {
|
||||
name?: string;
|
||||
entry?: ReturnType<typeof NameRecord.prototype.toObject>;
|
||||
}): NameEntry;
|
||||
toObject(): {
|
||||
name?: string | undefined;
|
||||
entry?: {
|
||||
latest?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
} | undefined;
|
||||
history?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameEntry;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): NameEntry;
|
||||
}
|
||||
class NameRecord extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
latest?: NameRecordEntry;
|
||||
history?: NameRecordEntry[];
|
||||
});
|
||||
get latest(): NameRecordEntry;
|
||||
set latest(value: NameRecordEntry);
|
||||
get history(): NameRecordEntry[];
|
||||
set history(value: NameRecordEntry[]);
|
||||
static fromObject(data: {
|
||||
latest?: ReturnType<typeof NameRecordEntry.prototype.toObject>;
|
||||
history?: ReturnType<typeof NameRecordEntry.prototype.toObject>[];
|
||||
}): NameRecord;
|
||||
toObject(): {
|
||||
latest?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
} | undefined;
|
||||
history?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameRecord;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): NameRecord;
|
||||
}
|
||||
class NameRecordEntry extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
height?: number;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get height(): number;
|
||||
set height(value: number);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
height?: number;
|
||||
}): NameRecordEntry;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): NameRecordEntry;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): NameRecordEntry;
|
||||
}
|
||||
class Signature extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
sig?: string;
|
||||
pub_key?: string;
|
||||
});
|
||||
get sig(): string;
|
||||
set sig(value: string);
|
||||
get pub_key(): string;
|
||||
set pub_key(value: string);
|
||||
static fromObject(data: {
|
||||
sig?: string;
|
||||
pub_key?: string;
|
||||
}): Signature;
|
||||
toObject(): {
|
||||
sig?: string | undefined;
|
||||
pub_key?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signature;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Signature;
|
||||
}
|
||||
class BlockChangeSet extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
height?: number;
|
||||
records?: string[];
|
||||
auctions?: string[];
|
||||
auction_bids?: AuctionBidInfo[];
|
||||
authorities?: string[];
|
||||
names?: string[];
|
||||
});
|
||||
get height(): number;
|
||||
set height(value: number);
|
||||
get records(): string[];
|
||||
set records(value: string[]);
|
||||
get auctions(): string[];
|
||||
set auctions(value: string[]);
|
||||
get auction_bids(): AuctionBidInfo[];
|
||||
set auction_bids(value: AuctionBidInfo[]);
|
||||
get authorities(): string[];
|
||||
set authorities(value: string[]);
|
||||
get names(): string[];
|
||||
set names(value: string[]);
|
||||
static fromObject(data: {
|
||||
height?: number;
|
||||
records?: string[];
|
||||
auctions?: string[];
|
||||
auction_bids?: ReturnType<typeof AuctionBidInfo.prototype.toObject>[];
|
||||
authorities?: string[];
|
||||
names?: string[];
|
||||
}): BlockChangeSet;
|
||||
toObject(): {
|
||||
height?: number | undefined;
|
||||
records?: string[] | undefined;
|
||||
auctions?: string[] | undefined;
|
||||
auction_bids?: {
|
||||
auction_id?: string | undefined;
|
||||
bidder_address?: string | undefined;
|
||||
}[] | undefined;
|
||||
authorities?: string[] | undefined;
|
||||
names?: string[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BlockChangeSet;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): BlockChangeSet;
|
||||
}
|
||||
class AuctionBidInfo extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
auction_id?: string;
|
||||
bidder_address?: string;
|
||||
});
|
||||
get auction_id(): string;
|
||||
set auction_id(value: string);
|
||||
get bidder_address(): string;
|
||||
set bidder_address(value: string);
|
||||
static fromObject(data: {
|
||||
auction_id?: string;
|
||||
bidder_address?: string;
|
||||
}): AuctionBidInfo;
|
||||
toObject(): {
|
||||
auction_id?: string | undefined;
|
||||
bidder_address?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AuctionBidInfo;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AuctionBidInfo;
|
||||
}
|
||||
}
|
1316
dist/proto/vulcanize/nameservice/v1beta1/nameservice.js
vendored
Normal file
1316
dist/proto/vulcanize/nameservice/v1beta1/nameservice.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
773
dist/proto/vulcanize/nameservice/v1beta1/query.d.ts
vendored
Normal file
773
dist/proto/vulcanize/nameservice/v1beta1/query.d.ts
vendored
Normal file
@ -0,0 +1,773 @@
|
||||
/**
|
||||
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
||||
* compiler version: 3.14.0
|
||||
* source: vulcanize/nameservice/v1beta1/query.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as dependency_1 from "./nameservice";
|
||||
import * as dependency_3 from "./../../../cosmos/base/query/v1beta1/pagination";
|
||||
import * as dependency_5 from "./../../../cosmos/base/v1beta1/coin";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.nameservice.v1beta1 {
|
||||
class QueryParamsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): QueryParamsRequest;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryParamsRequest;
|
||||
}
|
||||
class QueryParamsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
params?: dependency_1.vulcanize.nameservice.v1beta1.Params;
|
||||
});
|
||||
get params(): dependency_1.vulcanize.nameservice.v1beta1.Params;
|
||||
set params(value: dependency_1.vulcanize.nameservice.v1beta1.Params);
|
||||
static fromObject(data: {
|
||||
params?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.Params.prototype.toObject>;
|
||||
}): QueryParamsResponse;
|
||||
toObject(): {
|
||||
params?: {
|
||||
record_rent?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
record_rent_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_rent?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_rent_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_grace_period?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_enabled?: boolean | undefined;
|
||||
authority_auction_commits_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_reveals_duration?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
authority_auction_commit_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_auction_reveal_fee?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
authority_auction_minimum_bid?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryParamsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryParamsResponse;
|
||||
}
|
||||
class QueryListRecordsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
attributes?: QueryListRecordsRequest.KeyValueInput[];
|
||||
all?: boolean;
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get attributes(): QueryListRecordsRequest.KeyValueInput[];
|
||||
set attributes(value: QueryListRecordsRequest.KeyValueInput[]);
|
||||
get all(): boolean;
|
||||
set all(value: boolean);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
attributes?: ReturnType<typeof QueryListRecordsRequest.KeyValueInput.prototype.toObject>[];
|
||||
all?: boolean;
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): QueryListRecordsRequest;
|
||||
toObject(): {
|
||||
attributes?: {
|
||||
key?: string | undefined;
|
||||
value?: {
|
||||
type?: string | undefined;
|
||||
string?: string | undefined;
|
||||
int?: number | undefined;
|
||||
float?: number | undefined;
|
||||
boolean?: boolean | undefined;
|
||||
reference?: {
|
||||
id?: string | undefined;
|
||||
} | undefined;
|
||||
values?: any[] | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
all?: boolean | undefined;
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListRecordsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryListRecordsRequest;
|
||||
}
|
||||
namespace QueryListRecordsRequest {
|
||||
class ReferenceInput extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
}): ReferenceInput;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ReferenceInput;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): ReferenceInput;
|
||||
}
|
||||
class ValueInput extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
type?: string;
|
||||
string?: string;
|
||||
int?: number;
|
||||
float?: number;
|
||||
boolean?: boolean;
|
||||
reference?: QueryListRecordsRequest.ReferenceInput;
|
||||
values?: QueryListRecordsRequest.ValueInput[];
|
||||
});
|
||||
get type(): string;
|
||||
set type(value: string);
|
||||
get string(): string;
|
||||
set string(value: string);
|
||||
get int(): number;
|
||||
set int(value: number);
|
||||
get float(): number;
|
||||
set float(value: number);
|
||||
get boolean(): boolean;
|
||||
set boolean(value: boolean);
|
||||
get reference(): QueryListRecordsRequest.ReferenceInput;
|
||||
set reference(value: QueryListRecordsRequest.ReferenceInput);
|
||||
get values(): QueryListRecordsRequest.ValueInput[];
|
||||
set values(value: QueryListRecordsRequest.ValueInput[]);
|
||||
static fromObject(data: {
|
||||
type?: string;
|
||||
string?: string;
|
||||
int?: number;
|
||||
float?: number;
|
||||
boolean?: boolean;
|
||||
reference?: ReturnType<typeof QueryListRecordsRequest.ReferenceInput.prototype.toObject>;
|
||||
values?: ReturnType<typeof QueryListRecordsRequest.ValueInput.prototype.toObject>[];
|
||||
}): ValueInput;
|
||||
toObject(): {
|
||||
type?: string | undefined;
|
||||
string?: string | undefined;
|
||||
int?: number | undefined;
|
||||
float?: number | undefined;
|
||||
boolean?: boolean | undefined;
|
||||
reference?: {
|
||||
id?: string | undefined;
|
||||
} | undefined;
|
||||
values?: {
|
||||
type?: string | undefined;
|
||||
string?: string | undefined;
|
||||
int?: number | undefined;
|
||||
float?: number | undefined;
|
||||
boolean?: boolean | undefined;
|
||||
reference?: {
|
||||
id?: string | undefined;
|
||||
} | undefined;
|
||||
values?: any[] | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ValueInput;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): ValueInput;
|
||||
}
|
||||
class KeyValueInput extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
key?: string;
|
||||
value?: QueryListRecordsRequest.ValueInput;
|
||||
});
|
||||
get key(): string;
|
||||
set key(value: string);
|
||||
get value(): QueryListRecordsRequest.ValueInput;
|
||||
set value(value: QueryListRecordsRequest.ValueInput);
|
||||
static fromObject(data: {
|
||||
key?: string;
|
||||
value?: ReturnType<typeof QueryListRecordsRequest.ValueInput.prototype.toObject>;
|
||||
}): KeyValueInput;
|
||||
toObject(): {
|
||||
key?: string | undefined;
|
||||
value?: {
|
||||
type?: string | undefined;
|
||||
string?: string | undefined;
|
||||
int?: number | undefined;
|
||||
float?: number | undefined;
|
||||
boolean?: boolean | undefined;
|
||||
reference?: {
|
||||
id?: string | undefined;
|
||||
} | undefined;
|
||||
values?: any[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KeyValueInput;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): KeyValueInput;
|
||||
}
|
||||
}
|
||||
class QueryListRecordsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
records?: dependency_1.vulcanize.nameservice.v1beta1.Record[];
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get records(): dependency_1.vulcanize.nameservice.v1beta1.Record[];
|
||||
set records(value: dependency_1.vulcanize.nameservice.v1beta1.Record[]);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse);
|
||||
static fromObject(data: {
|
||||
records?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.Record.prototype.toObject>[];
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
|
||||
}): QueryListRecordsResponse;
|
||||
toObject(): {
|
||||
records?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListRecordsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryListRecordsResponse;
|
||||
}
|
||||
class QueryRecordByIdRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
}): QueryRecordByIdRequest;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByIdRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryRecordByIdRequest;
|
||||
}
|
||||
class QueryRecordByIdResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record?: dependency_1.vulcanize.nameservice.v1beta1.Record;
|
||||
});
|
||||
get record(): dependency_1.vulcanize.nameservice.v1beta1.Record;
|
||||
set record(value: dependency_1.vulcanize.nameservice.v1beta1.Record);
|
||||
static fromObject(data: {
|
||||
record?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.Record.prototype.toObject>;
|
||||
}): QueryRecordByIdResponse;
|
||||
toObject(): {
|
||||
record?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByIdResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryRecordByIdResponse;
|
||||
}
|
||||
class QueryRecordByBondIdRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): QueryRecordByBondIdRequest;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByBondIdRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryRecordByBondIdRequest;
|
||||
}
|
||||
class QueryRecordByBondIdResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
records?: dependency_1.vulcanize.nameservice.v1beta1.Record[];
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get records(): dependency_1.vulcanize.nameservice.v1beta1.Record[];
|
||||
set records(value: dependency_1.vulcanize.nameservice.v1beta1.Record[]);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse);
|
||||
static fromObject(data: {
|
||||
records?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.Record.prototype.toObject>[];
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
|
||||
}): QueryRecordByBondIdResponse;
|
||||
toObject(): {
|
||||
records?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryRecordByBondIdResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryRecordByBondIdResponse;
|
||||
}
|
||||
class GetNameServiceModuleBalanceRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): GetNameServiceModuleBalanceRequest;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetNameServiceModuleBalanceRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): GetNameServiceModuleBalanceRequest;
|
||||
}
|
||||
class GetNameServiceModuleBalanceResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
balances?: AccountBalance[];
|
||||
});
|
||||
get balances(): AccountBalance[];
|
||||
set balances(value: AccountBalance[]);
|
||||
static fromObject(data: {
|
||||
balances?: ReturnType<typeof AccountBalance.prototype.toObject>[];
|
||||
}): GetNameServiceModuleBalanceResponse;
|
||||
toObject(): {
|
||||
balances?: {
|
||||
account_name?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetNameServiceModuleBalanceResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): GetNameServiceModuleBalanceResponse;
|
||||
}
|
||||
class AccountBalance extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
account_name?: string;
|
||||
balance?: dependency_5.cosmos.base.v1beta1.Coin[];
|
||||
});
|
||||
get account_name(): string;
|
||||
set account_name(value: string);
|
||||
get balance(): dependency_5.cosmos.base.v1beta1.Coin[];
|
||||
set balance(value: dependency_5.cosmos.base.v1beta1.Coin[]);
|
||||
static fromObject(data: {
|
||||
account_name?: string;
|
||||
balance?: ReturnType<typeof dependency_5.cosmos.base.v1beta1.Coin.prototype.toObject>[];
|
||||
}): AccountBalance;
|
||||
toObject(): {
|
||||
account_name?: string | undefined;
|
||||
balance?: {
|
||||
denom?: string | undefined;
|
||||
amount?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AccountBalance;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): AccountBalance;
|
||||
}
|
||||
class QueryListNameRecordsRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): QueryListNameRecordsRequest;
|
||||
toObject(): {
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListNameRecordsRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryListNameRecordsRequest;
|
||||
}
|
||||
class QueryListNameRecordsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
names?: dependency_1.vulcanize.nameservice.v1beta1.NameEntry[];
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get names(): dependency_1.vulcanize.nameservice.v1beta1.NameEntry[];
|
||||
set names(value: dependency_1.vulcanize.nameservice.v1beta1.NameEntry[]);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse);
|
||||
static fromObject(data: {
|
||||
names?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.NameEntry.prototype.toObject>[];
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
|
||||
}): QueryListNameRecordsResponse;
|
||||
toObject(): {
|
||||
names?: {
|
||||
name?: string | undefined;
|
||||
entry?: {
|
||||
latest?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
} | undefined;
|
||||
history?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryListNameRecordsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryListNameRecordsResponse;
|
||||
}
|
||||
class QueryWhoisRequest extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name?: string;
|
||||
});
|
||||
get name(): string;
|
||||
set name(value: string);
|
||||
static fromObject(data: {
|
||||
name?: string;
|
||||
}): QueryWhoisRequest;
|
||||
toObject(): {
|
||||
name?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryWhoisRequest;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryWhoisRequest;
|
||||
}
|
||||
class QueryWhoisResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name_authority?: dependency_1.vulcanize.nameservice.v1beta1.NameAuthority;
|
||||
});
|
||||
get name_authority(): dependency_1.vulcanize.nameservice.v1beta1.NameAuthority;
|
||||
set name_authority(value: dependency_1.vulcanize.nameservice.v1beta1.NameAuthority);
|
||||
static fromObject(data: {
|
||||
name_authority?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.NameAuthority.prototype.toObject>;
|
||||
}): QueryWhoisResponse;
|
||||
toObject(): {
|
||||
name_authority?: {
|
||||
owner_public_key?: string | undefined;
|
||||
owner_address?: string | undefined;
|
||||
height?: number | undefined;
|
||||
status?: string | undefined;
|
||||
auction_id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
expiry_time?: {
|
||||
seconds?: number | undefined;
|
||||
nanos?: number | undefined;
|
||||
} | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryWhoisResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryWhoisResponse;
|
||||
}
|
||||
class QueryLookupCrn extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
crn?: string;
|
||||
});
|
||||
get crn(): string;
|
||||
set crn(value: string);
|
||||
static fromObject(data: {
|
||||
crn?: string;
|
||||
}): QueryLookupCrn;
|
||||
toObject(): {
|
||||
crn?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLookupCrn;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryLookupCrn;
|
||||
}
|
||||
class QueryLookupCrnResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name?: dependency_1.vulcanize.nameservice.v1beta1.NameRecord;
|
||||
});
|
||||
get name(): dependency_1.vulcanize.nameservice.v1beta1.NameRecord;
|
||||
set name(value: dependency_1.vulcanize.nameservice.v1beta1.NameRecord);
|
||||
static fromObject(data: {
|
||||
name?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.NameRecord.prototype.toObject>;
|
||||
}): QueryLookupCrnResponse;
|
||||
toObject(): {
|
||||
name?: {
|
||||
latest?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
} | undefined;
|
||||
history?: {
|
||||
id?: string | undefined;
|
||||
height?: number | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryLookupCrnResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryLookupCrnResponse;
|
||||
}
|
||||
class QueryResolveCrn extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
crn?: string;
|
||||
});
|
||||
get crn(): string;
|
||||
set crn(value: string);
|
||||
static fromObject(data: {
|
||||
crn?: string;
|
||||
}): QueryResolveCrn;
|
||||
toObject(): {
|
||||
crn?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryResolveCrn;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryResolveCrn;
|
||||
}
|
||||
class QueryResolveCrnResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record?: dependency_1.vulcanize.nameservice.v1beta1.Record;
|
||||
});
|
||||
get record(): dependency_1.vulcanize.nameservice.v1beta1.Record;
|
||||
set record(value: dependency_1.vulcanize.nameservice.v1beta1.Record);
|
||||
static fromObject(data: {
|
||||
record?: ReturnType<typeof dependency_1.vulcanize.nameservice.v1beta1.Record.prototype.toObject>;
|
||||
}): QueryResolveCrnResponse;
|
||||
toObject(): {
|
||||
record?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryResolveCrnResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryResolveCrnResponse;
|
||||
}
|
||||
class QueryGetRecordExpiryQueue extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): QueryGetRecordExpiryQueue;
|
||||
toObject(): {
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetRecordExpiryQueue;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetRecordExpiryQueue;
|
||||
}
|
||||
class QueryGetRecordExpiryQueueResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
records?: ExpiryQueueRecord[];
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get records(): ExpiryQueueRecord[];
|
||||
set records(value: ExpiryQueueRecord[]);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse);
|
||||
static fromObject(data: {
|
||||
records?: ReturnType<typeof ExpiryQueueRecord.prototype.toObject>[];
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
|
||||
}): QueryGetRecordExpiryQueueResponse;
|
||||
toObject(): {
|
||||
records?: {
|
||||
id?: string | undefined;
|
||||
value?: string[] | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetRecordExpiryQueueResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetRecordExpiryQueueResponse;
|
||||
}
|
||||
class ExpiryQueueRecord extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
value?: string[];
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
get value(): string[];
|
||||
set value(value: string[]);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
value?: string[];
|
||||
}): ExpiryQueueRecord;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
value?: string[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ExpiryQueueRecord;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): ExpiryQueueRecord;
|
||||
}
|
||||
class QueryGetAuthorityExpiryQueue extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
});
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageRequest;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageRequest);
|
||||
static fromObject(data: {
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>;
|
||||
}): QueryGetAuthorityExpiryQueue;
|
||||
toObject(): {
|
||||
pagination?: {
|
||||
key?: Uint8Array | undefined;
|
||||
offset?: number | undefined;
|
||||
limit?: number | undefined;
|
||||
count_total?: boolean | undefined;
|
||||
reverse?: boolean | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetAuthorityExpiryQueue;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetAuthorityExpiryQueue;
|
||||
}
|
||||
class QueryGetAuthorityExpiryQueueResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
authorities?: ExpiryQueueRecord[];
|
||||
pagination?: dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
});
|
||||
get authorities(): ExpiryQueueRecord[];
|
||||
set authorities(value: ExpiryQueueRecord[]);
|
||||
get pagination(): dependency_3.cosmos.base.query.v1beta1.PageResponse;
|
||||
set pagination(value: dependency_3.cosmos.base.query.v1beta1.PageResponse);
|
||||
static fromObject(data: {
|
||||
authorities?: ReturnType<typeof ExpiryQueueRecord.prototype.toObject>[];
|
||||
pagination?: ReturnType<typeof dependency_3.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>;
|
||||
}): QueryGetAuthorityExpiryQueueResponse;
|
||||
toObject(): {
|
||||
authorities?: {
|
||||
id?: string | undefined;
|
||||
value?: string[] | undefined;
|
||||
}[] | undefined;
|
||||
pagination?: {
|
||||
next_key?: Uint8Array | undefined;
|
||||
total?: number | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryGetAuthorityExpiryQueueResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): QueryGetAuthorityExpiryQueueResponse;
|
||||
}
|
||||
}
|
1939
dist/proto/vulcanize/nameservice/v1beta1/query.js
vendored
Normal file
1939
dist/proto/vulcanize/nameservice/v1beta1/query.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
422
dist/proto/vulcanize/nameservice/v1beta1/tx.d.ts
vendored
Normal file
422
dist/proto/vulcanize/nameservice/v1beta1/tx.d.ts
vendored
Normal file
@ -0,0 +1,422 @@
|
||||
import * as dependency_2 from "./nameservice";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export declare namespace vulcanize.nameservice.v1beta1 {
|
||||
class MsgSetRecord extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
payload?: Payload;
|
||||
});
|
||||
get bond_id(): string;
|
||||
set bond_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
get payload(): Payload;
|
||||
set payload(value: Payload);
|
||||
static fromObject(data: {
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
payload?: ReturnType<typeof Payload.prototype.toObject>;
|
||||
}): MsgSetRecord;
|
||||
toObject(): {
|
||||
bond_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
payload?: {
|
||||
record?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
} | undefined;
|
||||
signatures?: {
|
||||
sig?: string | undefined;
|
||||
pub_key?: string | undefined;
|
||||
}[] | undefined;
|
||||
} | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetRecord;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgSetRecord;
|
||||
}
|
||||
class MsgSetRecordResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
id?: string;
|
||||
});
|
||||
get id(): string;
|
||||
set id(value: string);
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
}): MsgSetRecordResponse;
|
||||
toObject(): {
|
||||
id?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetRecordResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgSetRecordResponse;
|
||||
}
|
||||
class Payload extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record?: dependency_2.vulcanize.nameservice.v1beta1.Record;
|
||||
signatures?: dependency_2.vulcanize.nameservice.v1beta1.Signature[];
|
||||
});
|
||||
get record(): dependency_2.vulcanize.nameservice.v1beta1.Record;
|
||||
set record(value: dependency_2.vulcanize.nameservice.v1beta1.Record);
|
||||
get signatures(): dependency_2.vulcanize.nameservice.v1beta1.Signature[];
|
||||
set signatures(value: dependency_2.vulcanize.nameservice.v1beta1.Signature[]);
|
||||
static fromObject(data: {
|
||||
record?: ReturnType<typeof dependency_2.vulcanize.nameservice.v1beta1.Record.prototype.toObject>;
|
||||
signatures?: ReturnType<typeof dependency_2.vulcanize.nameservice.v1beta1.Signature.prototype.toObject>[];
|
||||
}): Payload;
|
||||
toObject(): {
|
||||
record?: {
|
||||
id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
create_time?: string | undefined;
|
||||
expiry_time?: string | undefined;
|
||||
deleted?: boolean | undefined;
|
||||
owners?: string[] | undefined;
|
||||
attributes?: string | undefined;
|
||||
names?: string[] | undefined;
|
||||
} | undefined;
|
||||
signatures?: {
|
||||
sig?: string | undefined;
|
||||
pub_key?: string | undefined;
|
||||
}[] | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Payload;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): Payload;
|
||||
}
|
||||
class MsgSetName extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
crn?: string;
|
||||
cid?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get crn(): string;
|
||||
set crn(value: string);
|
||||
get cid(): string;
|
||||
set cid(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
crn?: string;
|
||||
cid?: string;
|
||||
signer?: string;
|
||||
}): MsgSetName;
|
||||
toObject(): {
|
||||
crn?: string | undefined;
|
||||
cid?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetName;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgSetName;
|
||||
}
|
||||
class MsgSetNameResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgSetNameResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetNameResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgSetNameResponse;
|
||||
}
|
||||
class MsgReserveAuthority extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name?: string;
|
||||
signer?: string;
|
||||
owner?: string;
|
||||
});
|
||||
get name(): string;
|
||||
set name(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
get owner(): string;
|
||||
set owner(value: string);
|
||||
static fromObject(data: {
|
||||
name?: string;
|
||||
signer?: string;
|
||||
owner?: string;
|
||||
}): MsgReserveAuthority;
|
||||
toObject(): {
|
||||
name?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
owner?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReserveAuthority;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgReserveAuthority;
|
||||
}
|
||||
class MsgReserveAuthorityResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgReserveAuthorityResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReserveAuthorityResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgReserveAuthorityResponse;
|
||||
}
|
||||
class MsgSetAuthorityBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
name?: string;
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get name(): string;
|
||||
set name(value: string);
|
||||
get bond_id(): string;
|
||||
set bond_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
name?: string;
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
}): MsgSetAuthorityBond;
|
||||
toObject(): {
|
||||
name?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetAuthorityBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgSetAuthorityBond;
|
||||
}
|
||||
class MsgSetAuthorityBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgSetAuthorityBondResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSetAuthorityBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgSetAuthorityBondResponse;
|
||||
}
|
||||
class MsgDeleteNameAuthority extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
crn?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get crn(): string;
|
||||
set crn(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
crn?: string;
|
||||
signer?: string;
|
||||
}): MsgDeleteNameAuthority;
|
||||
toObject(): {
|
||||
crn?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeleteNameAuthority;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgDeleteNameAuthority;
|
||||
}
|
||||
class MsgDeleteNameAuthorityResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgDeleteNameAuthorityResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDeleteNameAuthorityResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgDeleteNameAuthorityResponse;
|
||||
}
|
||||
class MsgRenewRecord extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record_id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get record_id(): string;
|
||||
set record_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
record_id?: string;
|
||||
signer?: string;
|
||||
}): MsgRenewRecord;
|
||||
toObject(): {
|
||||
record_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRenewRecord;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgRenewRecord;
|
||||
}
|
||||
class MsgRenewRecordResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgRenewRecordResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgRenewRecordResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgRenewRecordResponse;
|
||||
}
|
||||
class MsgAssociateBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record_id?: string;
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get record_id(): string;
|
||||
set record_id(value: string);
|
||||
get bond_id(): string;
|
||||
set bond_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
record_id?: string;
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
}): MsgAssociateBond;
|
||||
toObject(): {
|
||||
record_id?: string | undefined;
|
||||
bond_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAssociateBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgAssociateBond;
|
||||
}
|
||||
class MsgAssociateBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgAssociateBondResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgAssociateBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgAssociateBondResponse;
|
||||
}
|
||||
class MsgDissociateBond extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
record_id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get record_id(): string;
|
||||
set record_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
record_id?: string;
|
||||
signer?: string;
|
||||
}): MsgDissociateBond;
|
||||
toObject(): {
|
||||
record_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateBond;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgDissociateBond;
|
||||
}
|
||||
class MsgDissociateBondResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgDissociateBondResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateBondResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgDissociateBondResponse;
|
||||
}
|
||||
class MsgDissociateRecords extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get bond_id(): string;
|
||||
set bond_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
bond_id?: string;
|
||||
signer?: string;
|
||||
}): MsgDissociateRecords;
|
||||
toObject(): {
|
||||
bond_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateRecords;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgDissociateRecords;
|
||||
}
|
||||
class MsgDissociateRecordsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgDissociateRecordsResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgDissociateRecordsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgDissociateRecordsResponse;
|
||||
}
|
||||
class MsgReAssociateRecords extends pb_1.Message {
|
||||
constructor(data?: any[] | {
|
||||
new_bond_id?: string;
|
||||
old_bond_id?: string;
|
||||
signer?: string;
|
||||
});
|
||||
get new_bond_id(): string;
|
||||
set new_bond_id(value: string);
|
||||
get old_bond_id(): string;
|
||||
set old_bond_id(value: string);
|
||||
get signer(): string;
|
||||
set signer(value: string);
|
||||
static fromObject(data: {
|
||||
new_bond_id?: string;
|
||||
old_bond_id?: string;
|
||||
signer?: string;
|
||||
}): MsgReAssociateRecords;
|
||||
toObject(): {
|
||||
new_bond_id?: string | undefined;
|
||||
old_bond_id?: string | undefined;
|
||||
signer?: string | undefined;
|
||||
};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReAssociateRecords;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgReAssociateRecords;
|
||||
}
|
||||
class MsgReAssociateRecordsResponse extends pb_1.Message {
|
||||
constructor(data?: any[] | {});
|
||||
static fromObject(data: {}): MsgReAssociateRecordsResponse;
|
||||
toObject(): {};
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgReAssociateRecordsResponse;
|
||||
serializeBinary(): Uint8Array;
|
||||
static deserializeBinary(bytes: Uint8Array): MsgReAssociateRecordsResponse;
|
||||
}
|
||||
}
|
1427
dist/proto/vulcanize/nameservice/v1beta1/tx.js
vendored
Normal file
1427
dist/proto/vulcanize/nameservice/v1beta1/tx.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
65
dist/registry-client.d.ts
vendored
Normal file
65
dist/registry-client.d.ts
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Registry
|
||||
*/
|
||||
export declare class RegistryClient {
|
||||
_restEndpoint: string;
|
||||
_graph: any;
|
||||
/**
|
||||
* Get query result.
|
||||
*/
|
||||
static getResult(query: any, key: string, modifier?: (rows: any[]) => {}): Promise<any>;
|
||||
/**
|
||||
* Prepare response attributes.
|
||||
*/
|
||||
static prepareAttributes(path: string): (rows: any[]) => any[];
|
||||
/**
|
||||
* New Client.
|
||||
*/
|
||||
constructor(restEndpoint: string, gqlEndpoint: string);
|
||||
/**
|
||||
* Get server status.
|
||||
*/
|
||||
getStatus(): Promise<any>;
|
||||
/**
|
||||
* Fetch Accounts.
|
||||
*/
|
||||
getAccounts(addresses: string[]): Promise<any>;
|
||||
/**
|
||||
* Get records by ids.
|
||||
*/
|
||||
getRecordsByIds(ids: string[], refs?: boolean): Promise<any>;
|
||||
/**
|
||||
* Get records by attributes.
|
||||
*/
|
||||
queryRecords(attributes: {
|
||||
[key: string]: any;
|
||||
}, all?: boolean, refs?: boolean): Promise<any>;
|
||||
/**
|
||||
* Lookup authorities by names.
|
||||
*/
|
||||
lookupAuthorities(names: string[], auction?: boolean): Promise<any>;
|
||||
/**
|
||||
* Get auctions by ids.
|
||||
*/
|
||||
getAuctionsByIds(ids: string[]): Promise<any>;
|
||||
/**
|
||||
* Lookup names.
|
||||
*/
|
||||
lookupNames(names: string[], history?: boolean): Promise<any>;
|
||||
/**
|
||||
* Resolve names to records.
|
||||
*/
|
||||
resolveNames(names: string[], refs?: boolean): Promise<any>;
|
||||
/**
|
||||
* Get bonds by ids.
|
||||
*/
|
||||
getBondsByIds(ids: string[]): Promise<any>;
|
||||
/**
|
||||
* Get records by attributes.
|
||||
*/
|
||||
queryBonds(attributes?: {}): Promise<any>;
|
||||
/**
|
||||
* Submit transaction.
|
||||
*/
|
||||
submit(tx: string): Promise<any>;
|
||||
}
|
409
dist/registry-client.js
vendored
Normal file
409
dist/registry-client.js
vendored
Normal file
@ -0,0 +1,409 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RegistryClient = void 0;
|
||||
const assert_1 = __importDefault(require("assert"));
|
||||
const axios_1 = __importDefault(require("axios"));
|
||||
const graphql_js_1 = __importDefault(require("graphql.js"));
|
||||
const lodash_1 = require("lodash");
|
||||
const provider_1 = require("@tharsis/provider");
|
||||
const util_1 = require("./util");
|
||||
const attributeField = `
|
||||
attributes {
|
||||
key
|
||||
value {
|
||||
null
|
||||
int
|
||||
float
|
||||
string
|
||||
boolean
|
||||
json
|
||||
reference {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
const refsField = `
|
||||
references {
|
||||
id
|
||||
}
|
||||
`;
|
||||
const historyFields = `
|
||||
history {
|
||||
id
|
||||
height
|
||||
}
|
||||
`;
|
||||
const auctionFields = `
|
||||
id
|
||||
status
|
||||
ownerAddress
|
||||
createTime
|
||||
commitsEndTime
|
||||
revealsEndTime
|
||||
commitFee {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
revealFee {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
minimumBid {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
winnerAddress
|
||||
winnerBid {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
winnerPrice {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
bids {
|
||||
bidderAddress
|
||||
status
|
||||
commitHash
|
||||
commitTime
|
||||
revealTime
|
||||
commitFee {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
revealFee {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
bidAmount {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
}
|
||||
`;
|
||||
/**
|
||||
* Registry
|
||||
*/
|
||||
class RegistryClient {
|
||||
/**
|
||||
* New Client.
|
||||
*/
|
||||
constructor(restEndpoint, gqlEndpoint) {
|
||||
(0, assert_1.default)(restEndpoint);
|
||||
this._restEndpoint = restEndpoint;
|
||||
this._graph = (0, graphql_js_1.default)(gqlEndpoint, {
|
||||
method: 'POST',
|
||||
asJSON: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get query result.
|
||||
*/
|
||||
static getResult(query, key, modifier) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const result = yield query;
|
||||
if (result && result[key] && result[key].length && result[key][0] !== null) {
|
||||
if (modifier) {
|
||||
return modifier(result[key]);
|
||||
}
|
||||
return result[key];
|
||||
}
|
||||
return [];
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Prepare response attributes.
|
||||
*/
|
||||
static prepareAttributes(path) {
|
||||
return (rows) => {
|
||||
const result = rows.map(r => {
|
||||
(0, lodash_1.set)(r, path, util_1.Util.fromGQLAttributes((0, lodash_1.get)(r, path)));
|
||||
return r;
|
||||
});
|
||||
return result;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Get server status.
|
||||
*/
|
||||
getStatus() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const query = `query {
|
||||
getStatus {
|
||||
version
|
||||
node {
|
||||
id
|
||||
network
|
||||
moniker
|
||||
}
|
||||
sync {
|
||||
latest_block_hash
|
||||
latest_block_height
|
||||
latest_block_time
|
||||
catching_up
|
||||
}
|
||||
validator {
|
||||
address
|
||||
voting_power
|
||||
}
|
||||
validators {
|
||||
address
|
||||
voting_power
|
||||
proposer_priority
|
||||
}
|
||||
num_peers
|
||||
peers {
|
||||
node {
|
||||
id
|
||||
network
|
||||
moniker
|
||||
}
|
||||
is_outbound
|
||||
remote_ip
|
||||
}
|
||||
disk_usage
|
||||
}
|
||||
}`;
|
||||
const { getStatus: status } = yield this._graph(query)();
|
||||
return status;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Fetch Accounts.
|
||||
*/
|
||||
getAccounts(addresses) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(addresses);
|
||||
(0, assert_1.default)(addresses.length);
|
||||
const query = `query ($addresses: [String!]) {
|
||||
getAccounts(addresses: $addresses) {
|
||||
address
|
||||
pubKey
|
||||
number
|
||||
sequence
|
||||
balance {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
addresses
|
||||
};
|
||||
return RegistryClient.getResult(this._graph(query)(variables), 'getAccounts');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get records by ids.
|
||||
*/
|
||||
getRecordsByIds(ids, refs = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(ids);
|
||||
(0, assert_1.default)(ids.length);
|
||||
const query = `query ($ids: [String!]) {
|
||||
getRecordsByIds(ids: $ids) {
|
||||
id
|
||||
names
|
||||
owners
|
||||
bondId
|
||||
createTime
|
||||
expiryTime
|
||||
${attributeField}
|
||||
${refs ? refsField : ''}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
ids
|
||||
};
|
||||
return RegistryClient.getResult(this._graph(query)(variables), 'getRecordsByIds', RegistryClient.prepareAttributes('attributes'));
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get records by attributes.
|
||||
*/
|
||||
queryRecords(attributes, all = false, refs = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!attributes) {
|
||||
attributes = {};
|
||||
}
|
||||
const query = `query ($attributes: [KeyValueInput!], $all: Boolean) {
|
||||
queryRecords(attributes: $attributes, all: $all) {
|
||||
id
|
||||
names
|
||||
owners
|
||||
bondId
|
||||
createTime
|
||||
expiryTime
|
||||
${attributeField}
|
||||
${refs ? refsField : ''}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
attributes: util_1.Util.toGQLAttributes(attributes),
|
||||
all
|
||||
};
|
||||
let result = (yield this._graph(query)(variables))['queryRecords'];
|
||||
result = RegistryClient.prepareAttributes('attributes')(result);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Lookup authorities by names.
|
||||
*/
|
||||
lookupAuthorities(names, auction = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(names.length);
|
||||
const query = `query ($names: [String!]) {
|
||||
lookupAuthorities(names: $names) {
|
||||
ownerAddress
|
||||
ownerPublicKey
|
||||
height
|
||||
status
|
||||
bondId
|
||||
expiryTime
|
||||
${auction ? ('auction { ' + auctionFields + ' }') : ''}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
names
|
||||
};
|
||||
const result = yield this._graph(query)(variables);
|
||||
return result['lookupAuthorities'];
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get auctions by ids.
|
||||
*/
|
||||
getAuctionsByIds(ids) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(ids);
|
||||
(0, assert_1.default)(ids.length);
|
||||
const query = `query ($ids: [String!]) {
|
||||
getAuctionsByIds(ids: $ids) {
|
||||
${auctionFields}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
ids
|
||||
};
|
||||
return RegistryClient.getResult(this._graph(query)(variables), 'getAuctionsByIds');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Lookup names.
|
||||
*/
|
||||
lookupNames(names, history = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(names.length);
|
||||
const query = `query ($names: [String!]) {
|
||||
lookupNames(names: $names) {
|
||||
latest {
|
||||
id
|
||||
height
|
||||
}
|
||||
${history ? historyFields : ''}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
names
|
||||
};
|
||||
const result = yield this._graph(query)(variables);
|
||||
return result['lookupNames'];
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Resolve names to records.
|
||||
*/
|
||||
resolveNames(names, refs = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(names.length);
|
||||
const query = `query ($names: [String!]) {
|
||||
resolveNames(names: $names) {
|
||||
id
|
||||
names
|
||||
owners
|
||||
bondId
|
||||
createTime
|
||||
expiryTime
|
||||
${attributeField}
|
||||
${refs ? refsField : ''}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
names
|
||||
};
|
||||
let result = (yield this._graph(query)(variables))['resolveNames'];
|
||||
result = RegistryClient.prepareAttributes('attributes')(result);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get bonds by ids.
|
||||
*/
|
||||
getBondsByIds(ids) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(ids);
|
||||
(0, assert_1.default)(ids.length);
|
||||
const query = `query ($ids: [String!]) {
|
||||
getBondsByIds(ids: $ids) {
|
||||
id
|
||||
owner
|
||||
balance {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
ids
|
||||
};
|
||||
return RegistryClient.getResult(this._graph(query)(variables), 'getBondsByIds');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get records by attributes.
|
||||
*/
|
||||
queryBonds(attributes = {}) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const query = `query ($attributes: [KeyValueInput!]) {
|
||||
queryBonds(attributes: $attributes) {
|
||||
id
|
||||
owner
|
||||
balance {
|
||||
type
|
||||
quantity
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
attributes: util_1.Util.toGQLAttributes(attributes)
|
||||
};
|
||||
return RegistryClient.getResult(this._graph(query)(variables), 'queryBonds');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Submit transaction.
|
||||
*/
|
||||
submit(tx) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, assert_1.default)(tx);
|
||||
// Broadcast transaction.
|
||||
const { data } = yield axios_1.default.post(`${this._restEndpoint}${(0, provider_1.generateEndpointBroadcast)()}`, tx);
|
||||
return data;
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.RegistryClient = RegistryClient;
|
5
dist/schema/record.json
vendored
Normal file
5
dist/schema/record.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema#",
|
||||
"id": "/Record",
|
||||
"type": "object"
|
||||
}
|
19
dist/testing/helper.d.ts
vendored
Normal file
19
dist/testing/helper.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
import { Fee } from '@tharsis/transactions';
|
||||
import { Registry } from '../index';
|
||||
export declare const ensureUpdatedConfig: (path: string) => Promise<any>;
|
||||
export declare const getBaseConfig: (path: string) => Promise<any>;
|
||||
/**
|
||||
* Provision a bond for record registration.
|
||||
*/
|
||||
export declare const provisionBondId: (registry: Registry, privateKey: string, fee: Fee) => Promise<any>;
|
||||
export declare const getConfig: () => {
|
||||
chainId: string;
|
||||
privateKey: string;
|
||||
restEndpoint: string;
|
||||
gqlEndpoint: string;
|
||||
fee: {
|
||||
amount: string;
|
||||
denom: string;
|
||||
gas: string;
|
||||
};
|
||||
};
|
58
dist/testing/helper.js
vendored
Normal file
58
dist/testing/helper.js
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getConfig = exports.provisionBondId = exports.getBaseConfig = exports.ensureUpdatedConfig = void 0;
|
||||
const assert_1 = __importDefault(require("assert"));
|
||||
const node_yaml_1 = __importDefault(require("node-yaml"));
|
||||
const semver_1 = __importDefault(require("semver"));
|
||||
const ensureUpdatedConfig = (path) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const conf = yield node_yaml_1.default.read(path);
|
||||
conf.record.version = semver_1.default.inc(conf.record.version, 'patch');
|
||||
yield node_yaml_1.default.write(path, conf);
|
||||
return conf;
|
||||
});
|
||||
exports.ensureUpdatedConfig = ensureUpdatedConfig;
|
||||
const getBaseConfig = (path) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const conf = yield node_yaml_1.default.read(path);
|
||||
conf.record.version = '0.0.1';
|
||||
return conf;
|
||||
});
|
||||
exports.getBaseConfig = getBaseConfig;
|
||||
/**
|
||||
* Provision a bond for record registration.
|
||||
*/
|
||||
const provisionBondId = (registry, privateKey, fee) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
let bonds = yield registry.queryBonds();
|
||||
if (!bonds.length) {
|
||||
yield registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
|
||||
bonds = yield registry.queryBonds();
|
||||
}
|
||||
return bonds[0].id;
|
||||
});
|
||||
exports.provisionBondId = provisionBondId;
|
||||
const getConfig = () => {
|
||||
(0, assert_1.default)(process.env.PRIVATE_KEY);
|
||||
return {
|
||||
chainId: process.env.COSMOS_CHAIN_ID || 'laconic_9000-1',
|
||||
privateKey: process.env.PRIVATE_KEY,
|
||||
restEndpoint: process.env.LACONICD_REST_ENDPOINT || 'http://localhost:1317',
|
||||
gqlEndpoint: process.env.LACONICD_GQL_ENDPOINT || 'http://localhost:9473/api',
|
||||
fee: {
|
||||
amount: '20',
|
||||
denom: 'aphoton',
|
||||
gas: '200000',
|
||||
}
|
||||
};
|
||||
};
|
||||
exports.getConfig = getConfig;
|
9
dist/txbuilder.d.ts
vendored
Normal file
9
dist/txbuilder.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Chain, Sender } from '@tharsis/transactions';
|
||||
import { Account } from './account';
|
||||
/**
|
||||
* Generate a cosmos-sdk transaction.
|
||||
*/
|
||||
export declare const createTransaction: (message: any, account: Account, sender: Sender, chain: Chain) => {
|
||||
message: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxRaw;
|
||||
path: string;
|
||||
};
|
21
dist/txbuilder.js
vendored
Normal file
21
dist/txbuilder.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createTransaction = void 0;
|
||||
const assert_1 = __importDefault(require("assert"));
|
||||
const transactions_1 = require("@tharsis/transactions");
|
||||
/**
|
||||
* Generate a cosmos-sdk transaction.
|
||||
*/
|
||||
const createTransaction = (message, account, sender, chain) => {
|
||||
(0, assert_1.default)(message);
|
||||
(0, assert_1.default)(account);
|
||||
// Sign transaction.
|
||||
const signature = account.sign(message);
|
||||
let extension = (0, transactions_1.signatureToWeb3Extension)(chain, sender, signature);
|
||||
// Create the txRaw.
|
||||
return (0, transactions_1.createTxRawEIP712)(message.legacyAmino.body, message.legacyAmino.authInfo, extension);
|
||||
};
|
||||
exports.createTransaction = createTransaction;
|
72
dist/types.d.ts
vendored
Normal file
72
dist/types.d.ts
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Record.
|
||||
*/
|
||||
export declare class Record {
|
||||
_record: any;
|
||||
/**
|
||||
* New Record.
|
||||
*/
|
||||
constructor(record: any);
|
||||
get attributes(): string;
|
||||
/**
|
||||
* Serialize record.
|
||||
*/
|
||||
serialize(): {
|
||||
id: string;
|
||||
bond_id: string;
|
||||
create_time: string;
|
||||
expiry_time: string;
|
||||
deleted: boolean;
|
||||
attributes: string;
|
||||
};
|
||||
/**
|
||||
* Get message to calculate record signature.
|
||||
*/
|
||||
getMessageToSign(): any;
|
||||
}
|
||||
/**
|
||||
* Record Signature.
|
||||
*/
|
||||
export declare class Signature {
|
||||
_pubKey: string;
|
||||
_sig: string;
|
||||
/**
|
||||
* New Signature.
|
||||
*/
|
||||
constructor(pubKey: string, sig: string);
|
||||
/**
|
||||
* Serialize Signature.
|
||||
*/
|
||||
serialize(): any;
|
||||
}
|
||||
/**
|
||||
* Message Payload.
|
||||
*/
|
||||
export declare class Payload {
|
||||
_record: Record;
|
||||
_signatures: Signature[];
|
||||
/**
|
||||
* New Payload.
|
||||
*/
|
||||
constructor(record: Record, ...signatures: Signature[]);
|
||||
get record(): Record;
|
||||
get signatures(): Signature[];
|
||||
/**
|
||||
* Add message signature to payload.
|
||||
*/
|
||||
addSignature(signature: any): void;
|
||||
/**
|
||||
* Serialize Payload.
|
||||
*/
|
||||
serialize(): {
|
||||
record: {
|
||||
id: string;
|
||||
bond_id: string;
|
||||
create_time: string;
|
||||
expiry_time: string;
|
||||
deleted: boolean;
|
||||
attributes: string;
|
||||
};
|
||||
signatures: any[];
|
||||
};
|
||||
}
|
114
dist/types.js
vendored
Normal file
114
dist/types.js
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Payload = exports.Signature = exports.Record = void 0;
|
||||
const assert_1 = __importDefault(require("assert"));
|
||||
const jsonschema_1 = require("jsonschema");
|
||||
const record_json_1 = __importDefault(require("./schema/record.json"));
|
||||
const util_1 = require("./util");
|
||||
/**
|
||||
* Record.
|
||||
*/
|
||||
class Record {
|
||||
/**
|
||||
* New Record.
|
||||
*/
|
||||
constructor(record) {
|
||||
(0, assert_1.default)(record);
|
||||
const validator = new jsonschema_1.Validator();
|
||||
const result = validator.validate(record, record_json_1.default);
|
||||
if (!result.valid) {
|
||||
result.errors.map(console.error);
|
||||
throw new Error('Invalid record input.');
|
||||
}
|
||||
this._record = record;
|
||||
}
|
||||
get attributes() {
|
||||
return Buffer.from(JSON.stringify(this._record), 'binary').toString('base64');
|
||||
}
|
||||
/**
|
||||
* Serialize record.
|
||||
*/
|
||||
serialize() {
|
||||
return {
|
||||
'id': '_',
|
||||
'bond_id': '_',
|
||||
'create_time': '_',
|
||||
'expiry_time': '_',
|
||||
// Setting deleted as false (zero value) throws error in EIP712 signature verification.
|
||||
'deleted': true,
|
||||
'attributes': this.attributes,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Get message to calculate record signature.
|
||||
*/
|
||||
getMessageToSign() {
|
||||
return util_1.Util.sortJSON(this._record);
|
||||
}
|
||||
}
|
||||
exports.Record = Record;
|
||||
/**
|
||||
* Record Signature.
|
||||
*/
|
||||
class Signature {
|
||||
/**
|
||||
* New Signature.
|
||||
*/
|
||||
constructor(pubKey, sig) {
|
||||
(0, assert_1.default)(pubKey);
|
||||
(0, assert_1.default)(sig);
|
||||
this._pubKey = pubKey;
|
||||
this._sig = sig;
|
||||
}
|
||||
/**
|
||||
* Serialize Signature.
|
||||
*/
|
||||
serialize() {
|
||||
return util_1.Util.sortJSON({
|
||||
'pub_key': this._pubKey,
|
||||
'sig': this._sig
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.Signature = Signature;
|
||||
/**
|
||||
* Message Payload.
|
||||
*/
|
||||
class Payload {
|
||||
/**
|
||||
* New Payload.
|
||||
*/
|
||||
constructor(record, ...signatures) {
|
||||
(0, assert_1.default)(record);
|
||||
this._record = record;
|
||||
this._signatures = signatures;
|
||||
}
|
||||
get record() {
|
||||
return this._record;
|
||||
}
|
||||
get signatures() {
|
||||
return this._signatures;
|
||||
}
|
||||
/**
|
||||
* Add message signature to payload.
|
||||
*/
|
||||
addSignature(signature) {
|
||||
(0, assert_1.default)(signature);
|
||||
this._signatures.push(signature);
|
||||
}
|
||||
/**
|
||||
* Serialize Payload.
|
||||
*/
|
||||
serialize() {
|
||||
// return Util.sortJSON({
|
||||
// });
|
||||
return {
|
||||
'record': this._record.serialize(),
|
||||
'signatures': this._signatures.map(s => s.serialize())
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.Payload = Payload;
|
23
dist/util.d.ts
vendored
Normal file
23
dist/util.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Utils
|
||||
*/
|
||||
export declare class Util {
|
||||
/**
|
||||
* Sorts JSON object.
|
||||
*/
|
||||
static sortJSON(object: any): any;
|
||||
/**
|
||||
* Marshal object into gql 'attributes' variable.
|
||||
*/
|
||||
static toGQLAttributes(object: any): any[];
|
||||
/**
|
||||
* Unmarshal attributes array to object.
|
||||
*/
|
||||
static fromGQLAttributes(attributes?: any[]): {
|
||||
[key: string]: any;
|
||||
};
|
||||
/**
|
||||
* Get record content ID.
|
||||
*/
|
||||
static getContentId(record: any): Promise<string>;
|
||||
}
|
145
dist/util.js
vendored
Normal file
145
dist/util.js
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Util = void 0;
|
||||
const Block = __importStar(require("multiformats/block"));
|
||||
const sha2_1 = require("multiformats/hashes/sha2");
|
||||
const dagCBOR = __importStar(require("@ipld/dag-cbor"));
|
||||
const dagJSON = __importStar(require("@ipld/dag-json"));
|
||||
/**
|
||||
* Utils
|
||||
*/
|
||||
class Util {
|
||||
/**
|
||||
* Sorts JSON object.
|
||||
*/
|
||||
static sortJSON(object) {
|
||||
if (object instanceof Array) {
|
||||
for (let i = 0; i < object.length; i++) {
|
||||
object[i] = Util.sortJSON(object[i]);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
if (typeof object !== 'object' || object === null)
|
||||
return object;
|
||||
let keys = Object.keys(object);
|
||||
keys = keys.sort();
|
||||
const newObject = {};
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
newObject[keys[i]] = Util.sortJSON(object[keys[i]]);
|
||||
}
|
||||
return newObject;
|
||||
}
|
||||
/**
|
||||
* Marshal object into gql 'attributes' variable.
|
||||
*/
|
||||
static toGQLAttributes(object) {
|
||||
const vars = [];
|
||||
Object.keys(object).forEach(key => {
|
||||
let type = typeof object[key];
|
||||
if (object[key] === null) {
|
||||
vars.push({ key, value: { 'null': true } });
|
||||
}
|
||||
else if (type === 'number') {
|
||||
type = (object[key] % 1 === 0) ? 'int' : 'float';
|
||||
vars.push({ key, value: { [type]: object[key] } });
|
||||
}
|
||||
else if (type === 'string') {
|
||||
vars.push({ key, value: { 'string': object[key] } });
|
||||
}
|
||||
else if (type === 'boolean') {
|
||||
vars.push({ key, value: { 'boolean': object[key] } });
|
||||
}
|
||||
else if (type === 'object') {
|
||||
const nestedObject = object[key];
|
||||
if (nestedObject['/'] !== undefined) {
|
||||
vars.push({ key, value: { 'reference': { id: nestedObject['/'] } } });
|
||||
}
|
||||
}
|
||||
});
|
||||
return vars;
|
||||
}
|
||||
/**
|
||||
* Unmarshal attributes array to object.
|
||||
*/
|
||||
static fromGQLAttributes(attributes = []) {
|
||||
const res = {};
|
||||
attributes.forEach(attr => {
|
||||
if (attr.value.null) {
|
||||
res[attr.key] = null;
|
||||
}
|
||||
else if (attr.value.json) {
|
||||
res[attr.key] = JSON.parse(attr.value.json);
|
||||
}
|
||||
else if (attr.value.reference) {
|
||||
// Convert GQL reference to IPLD style link.
|
||||
const ref = attr.value.reference;
|
||||
res[attr.key] = { '/': ref.id };
|
||||
}
|
||||
else {
|
||||
const _a = attr.value, { values, null: n } = _a, types = __rest(_a, ["values", "null"]);
|
||||
const value = Object.values(types).find(v => v !== null);
|
||||
res[attr.key] = value;
|
||||
}
|
||||
});
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
* Get record content ID.
|
||||
*/
|
||||
static getContentId(record) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const serialized = dagJSON.encode(record);
|
||||
const recordData = dagJSON.decode(serialized);
|
||||
const block = yield Block.encode({
|
||||
value: recordData,
|
||||
codec: dagCBOR,
|
||||
hasher: sha2_1.sha256
|
||||
});
|
||||
return block.cid.toString();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.Util = Util;
|
Loading…
Reference in New Issue
Block a user