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

@streamr/config

Package Overview
Dependencies
Maintainers
17
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@streamr/config - npm Package Compare versions

Comparing version 0.0.3 to 1.0.0

2

package.json
{
"name": "@streamr/config",
"version": "0.0.3",
"version": "1.0.0",
"description": "Zero dependency package that contains Streamr Network smart contract addresses",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

@@ -17,7 +17,19 @@ # @streamr/config

```typescript
import { Chains } from "@streamr/config"
const {
ethereum: {
id: chainId,
contracts: {
"DATA-token": dataTokenAddress
}
}
} = Chains.load("production")
```
Find RPC endpoints:
```typescript
import * as config from "@streamr/config"
const chains: config.Chains = config.Chains.load("production")
const contractAddress: string = chains.ethereum.contracts["DATA-token"]
const chainId: number = chains.ethereum.id
const httpRpcEndpoints: RPCEndpoint[] = chains.ethereum.getRPCEndpointsByProtocol(config.RPCProtocol.HTTP)

@@ -24,0 +36,0 @@ const wsRpcEndpoints: RPCEndpoint[] = chains.ethereum.getRPCEndpointsByProtocol(config.RPCProtocol.WEBSOCKET)

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