@harmony-js/network
Advanced tools
Comparing version 0.1.55 to 0.1.56
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
/** | ||
* ## About this package | ||
# @harmony-js/network | ||
This package provides a collection of apis to create messengers (HTTP, WebSocket) to connect to blockchain networks. | ||
## Installation | ||
``` | ||
npm install @harmony-js/network | ||
``` | ||
## Usage | ||
```javascript | ||
const { Messenger, HttpProvider, WSProvider } = require('@harmony-js/network'); | ||
const { ChainID, ChainType } = require('@harmony-js/utils'); | ||
const testnetHTTP = 'https://api.s0.b.hmny.io'; | ||
const testnetWS = 'wss://ws.s0.b.hmny.io'; | ||
const localHTTP = 'http://localhost:9500/'; | ||
const localWS = 'http://localhost:9800/'; | ||
const http = new HttpProvider(testnetHTTP); // for local use localHTTP | ||
const ws = new WSProvider(testnetWS); // for local use testnetWS | ||
const customHTTPMessenger = new Messenger(http, ChainType.Harmony, ChainID.HmyTestnet); // for local ChainID.HmyLocal | ||
const customWSMessenger = new Messenger(ws, ChainType.Harmony, ChainID.HmyTestnet); // for local ChainID.HmyLocal | ||
``` | ||
* | ||
* `@harmony-js/network` provides functions to handle messenger, providers and subscriptions... | ||
* | ||
* ## How to use this package | ||
* | ||
* ### 1. Create a Message | ||
* ```javascript | ||
* const { HttpProvider, Messenger } = require('@harmony-js/network'); | ||
* const { ChainType, ChainID } = require('@harmony-js/utils'); | ||
* | ||
* // create a custom messenger | ||
* const customMessenger = new Messenger( | ||
* new HttpProvider('http://localhost:9500'), | ||
* ChainType.Harmony, // if you are connected to Harmony's blockchain | ||
* ChainID.HmyLocal, // check if the chainId is correct | ||
* ) | ||
* ``` | ||
* | ||
* @packageDocumentation | ||
@@ -59,3 +65,4 @@ * @module harmony-network | ||
GetShardingStructure = "hmy_getShardingStructure", | ||
SendRawStakingTransaction = "hmy_sendRawStakingTransaction" | ||
SendRawStakingTransaction = "hmy_sendRawStakingTransaction", | ||
GetAccountNonce = "hmy_getAccountNonce" | ||
} | ||
@@ -62,0 +69,0 @@ /**@ignore */ |
"use strict"; | ||
/** | ||
* ## About this package | ||
# @harmony-js/network | ||
This package provides a collection of apis to create messengers (HTTP, WebSocket) to connect to blockchain networks. | ||
## Installation | ||
``` | ||
npm install @harmony-js/network | ||
``` | ||
## Usage | ||
```javascript | ||
const { Messenger, HttpProvider, WSProvider } = require('@harmony-js/network'); | ||
const { ChainID, ChainType } = require('@harmony-js/utils'); | ||
const testnetHTTP = 'https://api.s0.b.hmny.io'; | ||
const testnetWS = 'wss://ws.s0.b.hmny.io'; | ||
const localHTTP = 'http://localhost:9500/'; | ||
const localWS = 'http://localhost:9800/'; | ||
const http = new HttpProvider(testnetHTTP); // for local use localHTTP | ||
const ws = new WSProvider(testnetWS); // for local use testnetWS | ||
const customHTTPMessenger = new Messenger(http, ChainType.Harmony, ChainID.HmyTestnet); // for local ChainID.HmyLocal | ||
const customWSMessenger = new Messenger(ws, ChainType.Harmony, ChainID.HmyTestnet); // for local ChainID.HmyLocal | ||
``` | ||
* | ||
* `@harmony-js/network` provides functions to handle messenger, providers and subscriptions... | ||
* | ||
* ## How to use this package | ||
* | ||
* ### 1. Create a Message | ||
* ```javascript | ||
* const { HttpProvider, Messenger } = require('@harmony-js/network'); | ||
* const { ChainType, ChainID } = require('@harmony-js/utils'); | ||
* | ||
* // create a custom messenger | ||
* const customMessenger = new Messenger( | ||
* new HttpProvider('http://localhost:9500'), | ||
* ChainType.Harmony, // if you are connected to Harmony's blockchain | ||
* ChainID.HmyLocal, // check if the chainId is correct | ||
* ) | ||
* ``` | ||
* | ||
* @packageDocumentation | ||
@@ -98,2 +104,4 @@ * @module harmony-network | ||
RPCMethod["SendRawStakingTransaction"] = "hmy_sendRawStakingTransaction"; | ||
// 34. hmy_getAccountNonce | ||
RPCMethod["GetAccountNonce"] = "hmy_getAccountNonce"; | ||
})(RPCMethod = exports.RPCMethod || (exports.RPCMethod = {})); | ||
@@ -100,0 +108,0 @@ /**@ignore */ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "@harmony-js/network", | ||
"version": "0.1.55", | ||
"version": "0.1.56", | ||
"description": "network suites for harmony", | ||
@@ -21,3 +21,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@harmony-js/utils": "0.1.55", | ||
"@harmony-js/utils": "0.1.56", | ||
"cross-fetch": "^3.0.2", | ||
@@ -27,3 +27,3 @@ "mitt": "^1.2.0", | ||
}, | ||
"gitHead": "c49abc56916e6edf7aa959e38397ff280e47ec30" | ||
"gitHead": "8f8e17fdaed394af1c28cd133d6018bf48915a81" | ||
} |
/** | ||
* ## About this package | ||
# @harmony-js/network | ||
This package provides a collection of apis to create messengers (HTTP, WebSocket) to connect to blockchain networks. | ||
## Installation | ||
``` | ||
npm install @harmony-js/network | ||
``` | ||
## Usage | ||
```javascript | ||
const { Messenger, HttpProvider, WSProvider } = require('@harmony-js/network'); | ||
const { ChainID, ChainType } = require('@harmony-js/utils'); | ||
const testnetHTTP = 'https://api.s0.b.hmny.io'; | ||
const testnetWS = 'wss://ws.s0.b.hmny.io'; | ||
const localHTTP = 'http://localhost:9500/'; | ||
const localWS = 'http://localhost:9800/'; | ||
const http = new HttpProvider(testnetHTTP); // for local use localHTTP | ||
const ws = new WSProvider(testnetWS); // for local use testnetWS | ||
const customHTTPMessenger = new Messenger(http, ChainType.Harmony, ChainID.HmyTestnet); // for local ChainID.HmyLocal | ||
const customWSMessenger = new Messenger(ws, ChainType.Harmony, ChainID.HmyTestnet); // for local ChainID.HmyLocal | ||
``` | ||
* | ||
* `@harmony-js/network` provides functions to handle messenger, providers and subscriptions... | ||
* | ||
* ## How to use this package | ||
* | ||
* ### 1. Create a Message | ||
* ```javascript | ||
* const { HttpProvider, Messenger } = require('@harmony-js/network'); | ||
* const { ChainType, ChainID } = require('@harmony-js/utils'); | ||
* | ||
* // create a custom messenger | ||
* const customMessenger = new Messenger( | ||
* new HttpProvider('http://localhost:9500'), | ||
* ChainType.Harmony, // if you are connected to Harmony's blockchain | ||
* ChainID.HmyLocal, // check if the chainId is correct | ||
* ) | ||
* ``` | ||
* | ||
* @packageDocumentation | ||
@@ -98,2 +104,4 @@ * @module harmony-network | ||
SendRawStakingTransaction = 'hmy_sendRawStakingTransaction', | ||
// 34. hmy_getAccountNonce | ||
GetAccountNonce = 'hmy_getAccountNonce', | ||
} | ||
@@ -100,0 +108,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
0
244295
120
4956
+ Added@harmony-js/utils@0.1.56(transitive)
- Removed@harmony-js/utils@0.1.55(transitive)
Updated@harmony-js/utils@0.1.56