UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

157 lines (134 loc) 5.55 kB
"use strict"; /** * @fileoverview gRPC-Web generated client stub for provenance.oracle.v1 * @enhanceable * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var grpc = {}; grpc.web = require('grpc-web'); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); var proto = {}; proto.provenance = {}; proto.provenance.oracle = {}; proto.provenance.oracle.v1 = require('./tx_pb.js'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.provenance.oracle.v1.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.provenance.oracle.v1.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.provenance.oracle.v1.MsgUpdateOracleRequest, * !proto.provenance.oracle.v1.MsgUpdateOracleResponse>} */ var methodDescriptor_Msg_UpdateOracle = new grpc.web.MethodDescriptor('/provenance.oracle.v1.Msg/UpdateOracle', grpc.web.MethodType.UNARY, proto.provenance.oracle.v1.MsgUpdateOracleRequest, proto.provenance.oracle.v1.MsgUpdateOracleResponse, /** * @param {!proto.provenance.oracle.v1.MsgUpdateOracleRequest} request * @return {!Uint8Array} */ function (request) { return request.serializeBinary(); }, proto.provenance.oracle.v1.MsgUpdateOracleResponse.deserializeBinary); /** * @param {!proto.provenance.oracle.v1.MsgUpdateOracleRequest} request The * request proto * @param {?Object<string, string>} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.provenance.oracle.v1.MsgUpdateOracleResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream<!proto.provenance.oracle.v1.MsgUpdateOracleResponse>|undefined} * The XHR Node Readable Stream */ proto.provenance.oracle.v1.MsgClient.prototype.updateOracle = function (request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/provenance.oracle.v1.Msg/UpdateOracle', request, metadata || {}, methodDescriptor_Msg_UpdateOracle, callback); }; /** * @param {!proto.provenance.oracle.v1.MsgUpdateOracleRequest} request The * request proto * @param {?Object<string, string>=} metadata User defined * call metadata * @return {!Promise<!proto.provenance.oracle.v1.MsgUpdateOracleResponse>} * Promise that resolves to the response */ proto.provenance.oracle.v1.MsgPromiseClient.prototype.updateOracle = function (request, metadata) { return this.client_.unaryCall(this.hostname_ + '/provenance.oracle.v1.Msg/UpdateOracle', request, metadata || {}, methodDescriptor_Msg_UpdateOracle); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.provenance.oracle.v1.MsgSendQueryOracleRequest, * !proto.provenance.oracle.v1.MsgSendQueryOracleResponse>} */ var methodDescriptor_Msg_SendQueryOracle = new grpc.web.MethodDescriptor('/provenance.oracle.v1.Msg/SendQueryOracle', grpc.web.MethodType.UNARY, proto.provenance.oracle.v1.MsgSendQueryOracleRequest, proto.provenance.oracle.v1.MsgSendQueryOracleResponse, /** * @param {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} request * @return {!Uint8Array} */ function (request) { return request.serializeBinary(); }, proto.provenance.oracle.v1.MsgSendQueryOracleResponse.deserializeBinary); /** * @param {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} request The * request proto * @param {?Object<string, string>} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.provenance.oracle.v1.MsgSendQueryOracleResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream<!proto.provenance.oracle.v1.MsgSendQueryOracleResponse>|undefined} * The XHR Node Readable Stream */ proto.provenance.oracle.v1.MsgClient.prototype.sendQueryOracle = function (request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/provenance.oracle.v1.Msg/SendQueryOracle', request, metadata || {}, methodDescriptor_Msg_SendQueryOracle, callback); }; /** * @param {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} request The * request proto * @param {?Object<string, string>=} metadata User defined * call metadata * @return {!Promise<!proto.provenance.oracle.v1.MsgSendQueryOracleResponse>} * Promise that resolves to the response */ proto.provenance.oracle.v1.MsgPromiseClient.prototype.sendQueryOracle = function (request, metadata) { return this.client_.unaryCall(this.hostname_ + '/provenance.oracle.v1.Msg/SendQueryOracle', request, metadata || {}, methodDescriptor_Msg_SendQueryOracle); }; module.exports = proto.provenance.oracle.v1;