Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smartcosmos/sample-protobufs

Package Overview
Dependencies
Maintainers
7
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smartcosmos/sample-protobufs - npm Package Compare versions

Comparing version 0.0.1-rc.3 to 0.0.1

4

package.json
{
"name": "@smartcosmos/sample-protobufs",
"version": "0.0.1-rc.3",
"version": "0.0.1",
"description": "Protobuf files for gRPC APIs",

@@ -11,3 +11,3 @@ "author": "Smartrac Solutions, Inc.",

},
"gitHead": "3dace78063bcb6e3212d6830bf9982402d290397"
"gitHead": "ca76bc8979ebbbb60fc0a30bde0f280ae46ba0d2"
}

@@ -9,7 +9,37 @@ # `@smartcosmos/sample-protobufs`

### Setting up a server
```js
import { GRPCServer } from '@smartcosmos/cosmos-service-builder';
import protoPaths from '@smartcosmos/sample-protobufs';
new GRPCServer({
configuration: {
port: config.GRPC_PORT,
host: config.GRPC_HOST,
},
logger: config.LoggerConfig,
})
.addService({
protoPackage: 'sample.hello',
protoService: 'HelloService',
protoPath: protoPaths.sample, // imported from a protobuf package
}, {
serviceClass: servicePackages.sample.hello.HelloService, // class of the service implementation
params: { remotes, models },
});
```
### Setting up a client
```js
import { GRPCClient } from '@smartcosmos/cosmos-service-builder';
import protoPaths from '@smartcosmos/sample-protobufs';
// TODO: DEMONSTRATE API
protoPaths.sample
const grpcClients = {
...new GRPCClient({
protoPath: protoPaths.sample,
logger: config.LoggerConfig,
}).connect(config.GRPC_SERVER_SAMPLE_ADDRESS),
};
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc