UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

159 lines (135 loc) 5.56 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 gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); var proto = {}; proto.provenance = {}; proto.provenance.oracle = {}; proto.provenance.oracle.v1 = require('./query_pb.js'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.provenance.oracle.v1.QueryClient = 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.QueryPromiseClient = 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.QueryOracleAddressRequest, * !proto.provenance.oracle.v1.QueryOracleAddressResponse>} */ var methodDescriptor_Query_OracleAddress = new grpc.web.MethodDescriptor('/provenance.oracle.v1.Query/OracleAddress', grpc.web.MethodType.UNARY, proto.provenance.oracle.v1.QueryOracleAddressRequest, proto.provenance.oracle.v1.QueryOracleAddressResponse, /** * @param {!proto.provenance.oracle.v1.QueryOracleAddressRequest} request * @return {!Uint8Array} */ function (request) { return request.serializeBinary(); }, proto.provenance.oracle.v1.QueryOracleAddressResponse.deserializeBinary); /** * @param {!proto.provenance.oracle.v1.QueryOracleAddressRequest} request The * request proto * @param {?Object<string, string>} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.provenance.oracle.v1.QueryOracleAddressResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream<!proto.provenance.oracle.v1.QueryOracleAddressResponse>|undefined} * The XHR Node Readable Stream */ proto.provenance.oracle.v1.QueryClient.prototype.oracleAddress = function (request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/provenance.oracle.v1.Query/OracleAddress', request, metadata || {}, methodDescriptor_Query_OracleAddress, callback); }; /** * @param {!proto.provenance.oracle.v1.QueryOracleAddressRequest} request The * request proto * @param {?Object<string, string>=} metadata User defined * call metadata * @return {!Promise<!proto.provenance.oracle.v1.QueryOracleAddressResponse>} * Promise that resolves to the response */ proto.provenance.oracle.v1.QueryPromiseClient.prototype.oracleAddress = function (request, metadata) { return this.client_.unaryCall(this.hostname_ + '/provenance.oracle.v1.Query/OracleAddress', request, metadata || {}, methodDescriptor_Query_OracleAddress); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.provenance.oracle.v1.QueryOracleRequest, * !proto.provenance.oracle.v1.QueryOracleResponse>} */ var methodDescriptor_Query_Oracle = new grpc.web.MethodDescriptor('/provenance.oracle.v1.Query/Oracle', grpc.web.MethodType.UNARY, proto.provenance.oracle.v1.QueryOracleRequest, proto.provenance.oracle.v1.QueryOracleResponse, /** * @param {!proto.provenance.oracle.v1.QueryOracleRequest} request * @return {!Uint8Array} */ function (request) { return request.serializeBinary(); }, proto.provenance.oracle.v1.QueryOracleResponse.deserializeBinary); /** * @param {!proto.provenance.oracle.v1.QueryOracleRequest} request The * request proto * @param {?Object<string, string>} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.provenance.oracle.v1.QueryOracleResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream<!proto.provenance.oracle.v1.QueryOracleResponse>|undefined} * The XHR Node Readable Stream */ proto.provenance.oracle.v1.QueryClient.prototype.oracle = function (request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/provenance.oracle.v1.Query/Oracle', request, metadata || {}, methodDescriptor_Query_Oracle, callback); }; /** * @param {!proto.provenance.oracle.v1.QueryOracleRequest} request The * request proto * @param {?Object<string, string>=} metadata User defined * call metadata * @return {!Promise<!proto.provenance.oracle.v1.QueryOracleResponse>} * Promise that resolves to the response */ proto.provenance.oracle.v1.QueryPromiseClient.prototype.oracle = function (request, metadata) { return this.client_.unaryCall(this.hostname_ + '/provenance.oracle.v1.Query/Oracle', request, metadata || {}, methodDescriptor_Query_Oracle); }; module.exports = proto.provenance.oracle.v1;