{"id":49795,"library":"xplore-grpc-web-client","title":"xplore-grpc-web-client","description":"Generated gRPC-web client for the Xplore Aggregator service, providing TypeScript definitions and client implementations for interacting with Xplore's cross-chain aggregation. Version 1.18.2 includes support for aggregate calls and transaction record retrieval. This package is auto-generated from protobuf definitions and is primarily used in browser-based applications via gRPC-web. It ships with TypeScript types and is released as needed from the monorepo at github.com/routerprotocol/xplore-types. Unlike general-purpose gRPC clients, this one is specific to Xplore's API and handles protobuf serialization, metadata, and callbacks.","status":"active","version":"1.18.2","language":"javascript","source_language":"en","source_url":"https://github.com/routerprotocol/xplore-types","tags":["javascript","grpc","web","client","xplore","typescript"],"install":[{"cmd":"npm install xplore-grpc-web-client","lang":"bash","label":"npm"},{"cmd":"yarn add xplore-grpc-web-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add xplore-grpc-web-client","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for gRPC-web client functionality (imports from 'grpc' namespace).","package":"grpc-web","optional":false},{"reason":"Used for protobuf message types like XploreRequest, ChainToken, etc.","package":"google-protobuf","optional":false}],"imports":[{"note":"Named export from a deep path. The package's main entry does not export this directly.","wrong":"import AggregatorClient from 'xplore-grpc-web-client'","symbol":"AggregatorClient","correct":"import { AggregatorClient } from 'xplore-grpc-web-client/aggregator_pb_service'"},{"note":"ESM-only import. CommonJS require fails because the package uses ES modules.","wrong":"const XploreRequest = require('xplore-grpc-web-client').XploreRequest","symbol":"XploreRequest","correct":"import { XploreRequest } from 'xplore-grpc-web-client/aggregator_pb'"},{"note":"Same as XploreRequest, from the same protobuf module.","wrong":"import { ChainToken } from 'xplore-grpc-web-client'","symbol":"ChainToken","correct":"import { ChainToken } from 'xplore-grpc-web-client/aggregator_pb'"},{"symbol":"TransactionRecordRequest","correct":"import { TransactionRecordRequest } from 'xplore-grpc-web-client/aggregator_pb'"}],"quickstart":{"code":"import { AggregatorClient } from 'xplore-grpc-web-client/aggregator_pb_service';\nimport { XploreRequest, ChainToken } from 'xplore-grpc-web-client/aggregator_pb';\n\nconst client = new AggregatorClient(process.env.XPLORE_SERVER_URL ?? 'https://default-grpc-web-server.com');\n\nconst request = new XploreRequest();\nconst inputToken = new ChainToken();\ninputToken.setChainId('chain-1');\ninputToken.setAddress('0x123...');\nrequest.setInputToken(inputToken);\n\nclient.aggregateCall(request, {}, (err, response) => {\n  if (err) {\n    console.error(err);\n    return;\n  }\n  console.log(response?.toObject());\n});","lang":"typescript","description":"Shows creating an AggregatorClient, constructing a XploreRequest with a ChainToken, and making an aggregateCall with a callback."},"warnings":[{"fix":"Use full deep import paths for each module.","message":"Import paths are not from the package root; must use deep imports like 'xplore-grpc-web-client/aggregator_pb'.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use ES module imports (import syntax). If using CommonJS, use dynamic import().","message":"Package is ESM-only; CommonJS require will fail.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Install grpc-web and google-protobuf explicitly: npm install grpc-web google-protobuf","message":"The package depends on 'grpc-web' and 'google-protobuf' but does not list them as peer dependencies.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Wrap in a Promise if you prefer async/await: new Promise((resolve, reject) => client.aggregateCall(req, {}, (err, res) => err ? reject(err) : resolve(res)))","message":"Client methods expect callbacks; do not use Promise-based pattern without wrapping.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Consider using plain objects or modern protobuf libraries like protobuf-es.","message":"protobuf setter/getter methods (e.g., setChainId, toObject) are not type-safe and may be deprecated in future protobuf versions.","severity":"deprecated","affected_versions":">=1.18"}],"env_vars":null,"search_vec":"'/routerprotocol/xplore-types.':80 '1.18.2':32 'aggreg':14,30,36 'api':94 'applic':59 'auto':46 'auto-gener':45 'base':58 'browser':57 'browser-bas':56 'call':37 'callback':101 'chain':29 'client':5,10,20,86,105 'cross':28 'cross-chain':27 'definit':18,50 'general':83 'general-purpos':82 'generat':6,47 'github.com':79 'github.com/routerprotocol/xplore-types.':78 'grpc':3,8,62,85,103 'grpc-web':7,61 'handl':96 'implement':21 'includ':33 'interact':23 'javascript':102 'metadata':99 'monorepo':76 'need':73 'one':88 'packag':43 'primarili':53 'protobuf':49,97 'provid':16 'purpos':84 'record':40 'releas':71 'retriev':41 'serial':98 'servic':15 'ship':65 'specif':90 'support':34 'transact':39 'type':68 'typescript':17,67,107 'unlik':81 'use':54 'version':31 'via':60 'web':4,9,63,104 'xplore':2,13,25,92,106 'xplore-grpc-web-cli':1","created_at":"2026-06-07T17:03:38.546439+00:00","updated_at":"2026-06-07T17:03:38.546439+00:00","problems":[{"fix":"Use 'xplore-grpc-web-client/aggregator_pb_service' or other deep paths.","cause":"Importing from the package root instead of deep paths.","error":"Error: Cannot find module 'xplore-grpc-web-client'"},{"fix":"Use import { AggregatorClient } from 'xplore-grpc-web-client/aggregator_pb_service'","cause":"Using default import instead of named import from the correct path.","error":"TypeError: AggregatorClient is not a constructor"},{"fix":"Use import syntax instead of require().","cause":"Attempting to use require() in an ESM project.","error":"ReferenceError: require is not defined in ES module scope"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/routerprotocol/xplore-types#readme","github":"https://github.com/routerprotocol/xplore-types","docs":null,"changelog":null,"pypi":null,"npm":"xplore-grpc-web-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["api-client","messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}