@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
339 lines (291 loc) • 14 kB
JavaScript
"use strict";
/**
* @fileoverview gRPC-Web generated client stub for cosmos.staking.v1beta1
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var grpc = {};
grpc.web = require('grpc-web');
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js');
var cosmos_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js');
var proto = {};
proto.cosmos = {};
proto.cosmos.staking = {};
proto.cosmos.staking.v1beta1 = require('./tx_pb.js');
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.cosmos.staking.v1beta1.MsgClient = function (hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?grpc.web.ClientOptions} options
* @constructor
* @struct
* @final
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient = function (hostname, credentials, options) {
if (!options) options = {};
options.format = 'text';
/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);
/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.cosmos.staking.v1beta1.MsgCreateValidator,
* !proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>}
*/
var methodDescriptor_Msg_CreateValidator = new grpc.web.MethodDescriptor('/cosmos.staking.v1beta1.Msg/CreateValidator', grpc.web.MethodType.UNARY, proto.cosmos.staking.v1beta1.MsgCreateValidator, proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse,
/**
* @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request
* @return {!Uint8Array}
*/
function (request) {
return request.serializeBinary();
}, proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary);
/**
* @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.cosmos.staking.v1beta1.MsgClient.prototype.createValidator = function (request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/CreateValidator', request, metadata || {}, methodDescriptor_Msg_CreateValidator, callback);
};
/**
* @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>}
* Promise that resolves to the response
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.createValidator = function (request, metadata) {
return this.client_.unaryCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/CreateValidator', request, metadata || {}, methodDescriptor_Msg_CreateValidator);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.cosmos.staking.v1beta1.MsgEditValidator,
* !proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>}
*/
var methodDescriptor_Msg_EditValidator = new grpc.web.MethodDescriptor('/cosmos.staking.v1beta1.Msg/EditValidator', grpc.web.MethodType.UNARY, proto.cosmos.staking.v1beta1.MsgEditValidator, proto.cosmos.staking.v1beta1.MsgEditValidatorResponse,
/**
* @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request
* @return {!Uint8Array}
*/
function (request) {
return request.serializeBinary();
}, proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary);
/**
* @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.cosmos.staking.v1beta1.MsgEditValidatorResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.cosmos.staking.v1beta1.MsgClient.prototype.editValidator = function (request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/EditValidator', request, metadata || {}, methodDescriptor_Msg_EditValidator, callback);
};
/**
* @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>}
* Promise that resolves to the response
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.editValidator = function (request, metadata) {
return this.client_.unaryCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/EditValidator', request, metadata || {}, methodDescriptor_Msg_EditValidator);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.cosmos.staking.v1beta1.MsgDelegate,
* !proto.cosmos.staking.v1beta1.MsgDelegateResponse>}
*/
var methodDescriptor_Msg_Delegate = new grpc.web.MethodDescriptor('/cosmos.staking.v1beta1.Msg/Delegate', grpc.web.MethodType.UNARY, proto.cosmos.staking.v1beta1.MsgDelegate, proto.cosmos.staking.v1beta1.MsgDelegateResponse,
/**
* @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request
* @return {!Uint8Array}
*/
function (request) {
return request.serializeBinary();
}, proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary);
/**
* @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.cosmos.staking.v1beta1.MsgDelegateResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.cosmos.staking.v1beta1.MsgDelegateResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.cosmos.staking.v1beta1.MsgClient.prototype.delegate = function (request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/Delegate', request, metadata || {}, methodDescriptor_Msg_Delegate, callback);
};
/**
* @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.cosmos.staking.v1beta1.MsgDelegateResponse>}
* Promise that resolves to the response
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.delegate = function (request, metadata) {
return this.client_.unaryCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/Delegate', request, metadata || {}, methodDescriptor_Msg_Delegate);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.cosmos.staking.v1beta1.MsgBeginRedelegate,
* !proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>}
*/
var methodDescriptor_Msg_BeginRedelegate = new grpc.web.MethodDescriptor('/cosmos.staking.v1beta1.Msg/BeginRedelegate', grpc.web.MethodType.UNARY, proto.cosmos.staking.v1beta1.MsgBeginRedelegate, proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse,
/**
* @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request
* @return {!Uint8Array}
*/
function (request) {
return request.serializeBinary();
}, proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary);
/**
* @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.cosmos.staking.v1beta1.MsgClient.prototype.beginRedelegate = function (request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', request, metadata || {}, methodDescriptor_Msg_BeginRedelegate, callback);
};
/**
* @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>}
* Promise that resolves to the response
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.beginRedelegate = function (request, metadata) {
return this.client_.unaryCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', request, metadata || {}, methodDescriptor_Msg_BeginRedelegate);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.cosmos.staking.v1beta1.MsgUndelegate,
* !proto.cosmos.staking.v1beta1.MsgUndelegateResponse>}
*/
var methodDescriptor_Msg_Undelegate = new grpc.web.MethodDescriptor('/cosmos.staking.v1beta1.Msg/Undelegate', grpc.web.MethodType.UNARY, proto.cosmos.staking.v1beta1.MsgUndelegate, proto.cosmos.staking.v1beta1.MsgUndelegateResponse,
/**
* @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request
* @return {!Uint8Array}
*/
function (request) {
return request.serializeBinary();
}, proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary);
/**
* @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.cosmos.staking.v1beta1.MsgUndelegateResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.cosmos.staking.v1beta1.MsgUndelegateResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.cosmos.staking.v1beta1.MsgClient.prototype.undelegate = function (request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/Undelegate', request, metadata || {}, methodDescriptor_Msg_Undelegate, callback);
};
/**
* @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.cosmos.staking.v1beta1.MsgUndelegateResponse>}
* Promise that resolves to the response
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.undelegate = function (request, metadata) {
return this.client_.unaryCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/Undelegate', request, metadata || {}, methodDescriptor_Msg_Undelegate);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegation,
* !proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse>}
*/
var methodDescriptor_Msg_CancelUnbondingDelegation = new grpc.web.MethodDescriptor('/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation', grpc.web.MethodType.UNARY, proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegation, proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse,
/**
* @param {!proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegation} request
* @return {!Uint8Array}
*/
function (request) {
return request.serializeBinary();
}, proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse.deserializeBinary);
/**
* @param {!proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegation} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.RpcError, ?proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.cosmos.staking.v1beta1.MsgClient.prototype.cancelUnbondingDelegation = function (request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation', request, metadata || {}, methodDescriptor_Msg_CancelUnbondingDelegation, callback);
};
/**
* @param {!proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegation} request The
* request proto
* @param {?Object<string, string>=} metadata User defined
* call metadata
* @return {!Promise<!proto.cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse>}
* Promise that resolves to the response
*/
proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.cancelUnbondingDelegation = function (request, metadata) {
return this.client_.unaryCall(this.hostname_ + '/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation', request, metadata || {}, methodDescriptor_Msg_CancelUnbondingDelegation);
};
module.exports = proto.cosmos.staking.v1beta1;