/** * @fileoverview gRPC-Web generated client stub for api * @enhanceable * @public */ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.5.0 // protoc v3.21.12 // source: api/rpc_node.proto /* eslint-disable */ // @ts-nocheck import * as grpcWeb from 'grpc-web'; import * as common_request_pb from '../common/request_pb'; // proto import: "common/request.proto" import * as common_result_pb from '../common/result_pb'; // proto import: "common/result.proto" import * as config_chainmaker_server_pb from '../config/chainmaker_server_pb'; // proto import: "config/chainmaker_server.proto" import * as config_local_config_pb from '../config/local_config_pb'; // proto import: "config/local_config.proto" import * as config_log_config_pb from '../config/log_config_pb'; // proto import: "config/log_config.proto" import * as consensus_consensus_pb from '../consensus/consensus_pb'; // proto import: "consensus/consensus.proto" import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; // proto import: "google/protobuf/wrappers.proto" import * as sync_sync_pb from '../sync/sync_pb'; // proto import: "sync/sync.proto" import * as txpool_transaction_pool_pb from '../txpool/transaction_pool_pb'; // proto import: "txpool/transaction_pool.proto" export class RpcNodeClient { client_: grpcWeb.AbstractClientBase; hostname_: string; credentials_: null | { [index: string]: string; }; options_: null | { [index: string]: any; }; constructor (hostname: string, credentials?: null | { [index: string]: string; }, options?: null | { [index: string]: any; }) { if (!options) options = {}; if (!credentials) credentials = {}; options['format'] = 'binary'; this.client_ = new grpcWeb.GrpcWebClientBase(options); this.hostname_ = hostname.replace(/\/+$/, ''); this.credentials_ = credentials; this.options_ = options; } methodDescriptorSendRequest = new grpcWeb.MethodDescriptor( '/api.RpcNode/SendRequest', grpcWeb.MethodType.UNARY, common_request_pb.TxRequest, common_result_pb.TxResponse, (request: common_request_pb.TxRequest) => { return request.serializeBinary(); }, common_result_pb.TxResponse.deserializeBinary ); sendRequest( request: common_request_pb.TxRequest, metadata?: grpcWeb.Metadata | null): Promise; sendRequest( request: common_request_pb.TxRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: common_result_pb.TxResponse) => void): grpcWeb.ClientReadableStream; sendRequest( request: common_request_pb.TxRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: common_result_pb.TxResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/SendRequest', request, metadata || {}, this.methodDescriptorSendRequest, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/SendRequest', request, metadata || {}, this.methodDescriptorSendRequest); } methodDescriptorSendRequestSync = new grpcWeb.MethodDescriptor( '/api.RpcNode/SendRequestSync', grpcWeb.MethodType.UNARY, common_request_pb.TxRequest, common_result_pb.TxResponse, (request: common_request_pb.TxRequest) => { return request.serializeBinary(); }, common_result_pb.TxResponse.deserializeBinary ); sendRequestSync( request: common_request_pb.TxRequest, metadata?: grpcWeb.Metadata | null): Promise; sendRequestSync( request: common_request_pb.TxRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: common_result_pb.TxResponse) => void): grpcWeb.ClientReadableStream; sendRequestSync( request: common_request_pb.TxRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: common_result_pb.TxResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/SendRequestSync', request, metadata || {}, this.methodDescriptorSendRequestSync, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/SendRequestSync', request, metadata || {}, this.methodDescriptorSendRequestSync); } methodDescriptorSubscribe = new grpcWeb.MethodDescriptor( '/api.RpcNode/Subscribe', grpcWeb.MethodType.SERVER_STREAMING, common_request_pb.TxRequest, common_result_pb.SubscribeResult, (request: common_request_pb.TxRequest) => { return request.serializeBinary(); }, common_result_pb.SubscribeResult.deserializeBinary ); subscribe( request: common_request_pb.TxRequest, metadata?: grpcWeb.Metadata): grpcWeb.ClientReadableStream { return this.client_.serverStreaming( this.hostname_ + '/api.RpcNode/Subscribe', request, metadata || {}, this.methodDescriptorSubscribe); } methodDescriptorSubscribeWS = new grpcWeb.MethodDescriptor( '/api.RpcNode/SubscribeWS', grpcWeb.MethodType.SERVER_STREAMING, common_request_pb.RawTxRequest, common_result_pb.SubscribeResult, (request: common_request_pb.RawTxRequest) => { return request.serializeBinary(); }, common_result_pb.SubscribeResult.deserializeBinary ); subscribeWS( request: common_request_pb.RawTxRequest, metadata?: grpcWeb.Metadata): grpcWeb.ClientReadableStream { return this.client_.serverStreaming( this.hostname_ + '/api.RpcNode/SubscribeWS', request, metadata || {}, this.methodDescriptorSubscribeWS); } methodDescriptorUpdateDebugConfig = new grpcWeb.MethodDescriptor( '/api.RpcNode/UpdateDebugConfig', grpcWeb.MethodType.UNARY, config_local_config_pb.DebugConfigRequest, config_local_config_pb.DebugConfigResponse, (request: config_local_config_pb.DebugConfigRequest) => { return request.serializeBinary(); }, config_local_config_pb.DebugConfigResponse.deserializeBinary ); updateDebugConfig( request: config_local_config_pb.DebugConfigRequest, metadata?: grpcWeb.Metadata | null): Promise; updateDebugConfig( request: config_local_config_pb.DebugConfigRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: config_local_config_pb.DebugConfigResponse) => void): grpcWeb.ClientReadableStream; updateDebugConfig( request: config_local_config_pb.DebugConfigRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: config_local_config_pb.DebugConfigResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/UpdateDebugConfig', request, metadata || {}, this.methodDescriptorUpdateDebugConfig, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/UpdateDebugConfig', request, metadata || {}, this.methodDescriptorUpdateDebugConfig); } methodDescriptorRefreshLogLevelsConfig = new grpcWeb.MethodDescriptor( '/api.RpcNode/RefreshLogLevelsConfig', grpcWeb.MethodType.UNARY, config_log_config_pb.LogLevelsRequest, config_log_config_pb.LogLevelsResponse, (request: config_log_config_pb.LogLevelsRequest) => { return request.serializeBinary(); }, config_log_config_pb.LogLevelsResponse.deserializeBinary ); refreshLogLevelsConfig( request: config_log_config_pb.LogLevelsRequest, metadata?: grpcWeb.Metadata | null): Promise; refreshLogLevelsConfig( request: config_log_config_pb.LogLevelsRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: config_log_config_pb.LogLevelsResponse) => void): grpcWeb.ClientReadableStream; refreshLogLevelsConfig( request: config_log_config_pb.LogLevelsRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: config_log_config_pb.LogLevelsResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/RefreshLogLevelsConfig', request, metadata || {}, this.methodDescriptorRefreshLogLevelsConfig, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/RefreshLogLevelsConfig', request, metadata || {}, this.methodDescriptorRefreshLogLevelsConfig); } methodDescriptorGetChainMakerVersion = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetChainMakerVersion', grpcWeb.MethodType.UNARY, config_chainmaker_server_pb.ChainMakerVersionRequest, config_chainmaker_server_pb.ChainMakerVersionResponse, (request: config_chainmaker_server_pb.ChainMakerVersionRequest) => { return request.serializeBinary(); }, config_chainmaker_server_pb.ChainMakerVersionResponse.deserializeBinary ); getChainMakerVersion( request: config_chainmaker_server_pb.ChainMakerVersionRequest, metadata?: grpcWeb.Metadata | null): Promise; getChainMakerVersion( request: config_chainmaker_server_pb.ChainMakerVersionRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: config_chainmaker_server_pb.ChainMakerVersionResponse) => void): grpcWeb.ClientReadableStream; getChainMakerVersion( request: config_chainmaker_server_pb.ChainMakerVersionRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: config_chainmaker_server_pb.ChainMakerVersionResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetChainMakerVersion', request, metadata || {}, this.methodDescriptorGetChainMakerVersion, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetChainMakerVersion', request, metadata || {}, this.methodDescriptorGetChainMakerVersion); } methodDescriptorCheckNewBlockChainConfig = new grpcWeb.MethodDescriptor( '/api.RpcNode/CheckNewBlockChainConfig', grpcWeb.MethodType.UNARY, config_local_config_pb.CheckNewBlockChainConfigRequest, config_local_config_pb.CheckNewBlockChainConfigResponse, (request: config_local_config_pb.CheckNewBlockChainConfigRequest) => { return request.serializeBinary(); }, config_local_config_pb.CheckNewBlockChainConfigResponse.deserializeBinary ); checkNewBlockChainConfig( request: config_local_config_pb.CheckNewBlockChainConfigRequest, metadata?: grpcWeb.Metadata | null): Promise; checkNewBlockChainConfig( request: config_local_config_pb.CheckNewBlockChainConfigRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: config_local_config_pb.CheckNewBlockChainConfigResponse) => void): grpcWeb.ClientReadableStream; checkNewBlockChainConfig( request: config_local_config_pb.CheckNewBlockChainConfigRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: config_local_config_pb.CheckNewBlockChainConfigResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/CheckNewBlockChainConfig', request, metadata || {}, this.methodDescriptorCheckNewBlockChainConfig, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/CheckNewBlockChainConfig', request, metadata || {}, this.methodDescriptorCheckNewBlockChainConfig); } methodDescriptorGetPoolStatus = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetPoolStatus', grpcWeb.MethodType.UNARY, txpool_transaction_pool_pb.GetPoolStatusRequest, txpool_transaction_pool_pb.TxPoolStatus, (request: txpool_transaction_pool_pb.GetPoolStatusRequest) => { return request.serializeBinary(); }, txpool_transaction_pool_pb.TxPoolStatus.deserializeBinary ); getPoolStatus( request: txpool_transaction_pool_pb.GetPoolStatusRequest, metadata?: grpcWeb.Metadata | null): Promise; getPoolStatus( request: txpool_transaction_pool_pb.GetPoolStatusRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: txpool_transaction_pool_pb.TxPoolStatus) => void): grpcWeb.ClientReadableStream; getPoolStatus( request: txpool_transaction_pool_pb.GetPoolStatusRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: txpool_transaction_pool_pb.TxPoolStatus) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetPoolStatus', request, metadata || {}, this.methodDescriptorGetPoolStatus, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetPoolStatus', request, metadata || {}, this.methodDescriptorGetPoolStatus); } methodDescriptorGetTxIdsByTypeAndStage = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetTxIdsByTypeAndStage', grpcWeb.MethodType.UNARY, txpool_transaction_pool_pb.GetTxIdsByTypeAndStageRequest, txpool_transaction_pool_pb.GetTxIdsByTypeAndStageResponse, (request: txpool_transaction_pool_pb.GetTxIdsByTypeAndStageRequest) => { return request.serializeBinary(); }, txpool_transaction_pool_pb.GetTxIdsByTypeAndStageResponse.deserializeBinary ); getTxIdsByTypeAndStage( request: txpool_transaction_pool_pb.GetTxIdsByTypeAndStageRequest, metadata?: grpcWeb.Metadata | null): Promise; getTxIdsByTypeAndStage( request: txpool_transaction_pool_pb.GetTxIdsByTypeAndStageRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: txpool_transaction_pool_pb.GetTxIdsByTypeAndStageResponse) => void): grpcWeb.ClientReadableStream; getTxIdsByTypeAndStage( request: txpool_transaction_pool_pb.GetTxIdsByTypeAndStageRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: txpool_transaction_pool_pb.GetTxIdsByTypeAndStageResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetTxIdsByTypeAndStage', request, metadata || {}, this.methodDescriptorGetTxIdsByTypeAndStage, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetTxIdsByTypeAndStage', request, metadata || {}, this.methodDescriptorGetTxIdsByTypeAndStage); } methodDescriptorGetTxsInPoolByTxIds = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetTxsInPoolByTxIds', grpcWeb.MethodType.UNARY, txpool_transaction_pool_pb.GetTxsInPoolByTxIdsRequest, txpool_transaction_pool_pb.GetTxsInPoolByTxIdsResponse, (request: txpool_transaction_pool_pb.GetTxsInPoolByTxIdsRequest) => { return request.serializeBinary(); }, txpool_transaction_pool_pb.GetTxsInPoolByTxIdsResponse.deserializeBinary ); getTxsInPoolByTxIds( request: txpool_transaction_pool_pb.GetTxsInPoolByTxIdsRequest, metadata?: grpcWeb.Metadata | null): Promise; getTxsInPoolByTxIds( request: txpool_transaction_pool_pb.GetTxsInPoolByTxIdsRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: txpool_transaction_pool_pb.GetTxsInPoolByTxIdsResponse) => void): grpcWeb.ClientReadableStream; getTxsInPoolByTxIds( request: txpool_transaction_pool_pb.GetTxsInPoolByTxIdsRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: txpool_transaction_pool_pb.GetTxsInPoolByTxIdsResponse) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetTxsInPoolByTxIds', request, metadata || {}, this.methodDescriptorGetTxsInPoolByTxIds, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetTxsInPoolByTxIds', request, metadata || {}, this.methodDescriptorGetTxsInPoolByTxIds); } methodDescriptorGetConsensusStateJSON = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetConsensusStateJSON', grpcWeb.MethodType.UNARY, consensus_consensus_pb.GetConsensusStatusRequest, google_protobuf_wrappers_pb.BytesValue, (request: consensus_consensus_pb.GetConsensusStatusRequest) => { return request.serializeBinary(); }, google_protobuf_wrappers_pb.BytesValue.deserializeBinary ); getConsensusStateJSON( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata?: grpcWeb.Metadata | null): Promise; getConsensusStateJSON( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: google_protobuf_wrappers_pb.BytesValue) => void): grpcWeb.ClientReadableStream; getConsensusStateJSON( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: google_protobuf_wrappers_pb.BytesValue) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetConsensusStateJSON', request, metadata || {}, this.methodDescriptorGetConsensusStateJSON, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetConsensusStateJSON', request, metadata || {}, this.methodDescriptorGetConsensusStateJSON); } methodDescriptorGetConsensusValidators = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetConsensusValidators', grpcWeb.MethodType.UNARY, consensus_consensus_pb.GetConsensusStatusRequest, consensus_consensus_pb.Validators, (request: consensus_consensus_pb.GetConsensusStatusRequest) => { return request.serializeBinary(); }, consensus_consensus_pb.Validators.deserializeBinary ); getConsensusValidators( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata?: grpcWeb.Metadata | null): Promise; getConsensusValidators( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: consensus_consensus_pb.Validators) => void): grpcWeb.ClientReadableStream; getConsensusValidators( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: consensus_consensus_pb.Validators) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetConsensusValidators', request, metadata || {}, this.methodDescriptorGetConsensusValidators, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetConsensusValidators', request, metadata || {}, this.methodDescriptorGetConsensusValidators); } methodDescriptorGetConsensusHeight = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetConsensusHeight', grpcWeb.MethodType.UNARY, consensus_consensus_pb.GetConsensusStatusRequest, google_protobuf_wrappers_pb.UInt64Value, (request: consensus_consensus_pb.GetConsensusStatusRequest) => { return request.serializeBinary(); }, google_protobuf_wrappers_pb.UInt64Value.deserializeBinary ); getConsensusHeight( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata?: grpcWeb.Metadata | null): Promise; getConsensusHeight( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: google_protobuf_wrappers_pb.UInt64Value) => void): grpcWeb.ClientReadableStream; getConsensusHeight( request: consensus_consensus_pb.GetConsensusStatusRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: google_protobuf_wrappers_pb.UInt64Value) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetConsensusHeight', request, metadata || {}, this.methodDescriptorGetConsensusHeight, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetConsensusHeight', request, metadata || {}, this.methodDescriptorGetConsensusHeight); } methodDescriptorGetSyncState = new grpcWeb.MethodDescriptor( '/api.RpcNode/GetSyncState', grpcWeb.MethodType.UNARY, sync_sync_pb.GetSyncStateRequest, sync_sync_pb.SyncState, (request: sync_sync_pb.GetSyncStateRequest) => { return request.serializeBinary(); }, sync_sync_pb.SyncState.deserializeBinary ); getSyncState( request: sync_sync_pb.GetSyncStateRequest, metadata?: grpcWeb.Metadata | null): Promise; getSyncState( request: sync_sync_pb.GetSyncStateRequest, metadata: grpcWeb.Metadata | null, callback: (err: grpcWeb.RpcError, response: sync_sync_pb.SyncState) => void): grpcWeb.ClientReadableStream; getSyncState( request: sync_sync_pb.GetSyncStateRequest, metadata?: grpcWeb.Metadata | null, callback?: (err: grpcWeb.RpcError, response: sync_sync_pb.SyncState) => void) { if (callback !== undefined) { return this.client_.rpcCall( this.hostname_ + '/api.RpcNode/GetSyncState', request, metadata || {}, this.methodDescriptorGetSyncState, callback); } return this.client_.unaryCall( this.hostname_ + '/api.RpcNode/GetSyncState', request, metadata || {}, this.methodDescriptorGetSyncState); } }