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

conflux-web-utils

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conflux-web-utils - npm Package Compare versions

Comparing version 0.1.15-alpha.0 to 1.2.2-alpha.0

src/BloomFilter.js

40

package.json
{
"name": "conflux-web-utils",
"version": "0.1.15-alpha.0",
"description": "Collection of utility functions used in conflux-web.js.",
"repository": "https://github.com/Conflux-Chain/ConfluxWeb/tree/master/packages/conflux-web-utils",
"version": "1.2.2-alpha.0",
"description": "Collection of utility functions used in conflux-web.",
"repository": "https://github.com/Conflux-Chain/ConfluxWeb/tree/conflux-web-1.2.1/packages/conflux-web-utils",
"license": "LGPL-3.0",
"main": "dist/conflux-web-utils.cjs.js",
"module": "dist/conflux-web-utils.esm.js",
"browser": "dist/conflux-web-utils.umd.js",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"test": "jest",
"dtslint": "dtslint types --onlyTestTsNext"
"engines": {
"node": ">=8.0.0"
},
"types": "types/index.d.ts",
"main": "src/index.js",
"dependencies": {
"@babel/runtime": "^7.3.1",
"@types/bn.js": "^4.11.4",
"@types/node": "^10.12.18",
"bn.js": "4.11.8",
"confluxjs-unit": "*",
"eth-lib": "0.2.8",
"lodash": "^4.17.11",
"eth-lib": "0.2.7",
"ethjs-unit": "0.1.6",
"number-to-bn": "1.7.0",
"randomhex": "0.1.5",
"utf8": "2.1.1"
"underscore": "1.9.1",
"utf8": "3.0.0"
},
"devDependencies": {
"crypto-js": "3.1.9-1",
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2"
},
"files": [
"dist",
"types/index.d.ts"
],
"gitHead": "321bbe5fcd40edebce07b544836bb5f201947a94"
"gitHead": "5867aaed668598b8531a372128e7c0b84d975e99"
}
# conflux-web-utils
This is a sub package of [ConfluxWeb.js][repo]
This is a sub package of [conflux-web][repo]
This contains useful utility functions for Dapp developers.
Please read the [documentation][docs] for more.
## Installation
### Node.js
```bash

@@ -13,14 +16,24 @@ npm install conflux-web-utils

### In the Browser
Build running the following in the [conflux-web][repo] repository:
```bash
npm run-script build-all
```
Then include `dist/conflux-web-utils.js` in your html file.
This will expose the `ConfluxWebUtils` object on the window object.
## Usage
Import all of the utils functions
```js
import * as Utils from 'conflux-web-utils';
console.log(Utils);
> {
sha3: Function,
soliditySha3: Function,
isAddress: Function,
// in node.js
var ConfluxWebUtils = require('conflux-web-utils');
console.log(ConfluxWebUtils);
{
sha3: function(){},
soliditySha3: function(){},
isAddress: function(){},
...

@@ -30,15 +43,6 @@ }

Import what you need
```js
import { asciiToHex } from 'conflux-web-utils';
[docs]: https://phabricator.conflux-chain.org/w/javascript_api/
[repo]: https://github.com/Conflux-Chain/ConfluxWeb/tree/conflux-web-1.2.1
console.log(asciiToHex('I have 100!'));
> "0x49206861766520313030e282ac"
```
## Types
All the typescript typings are placed in the types folder.
[repo]: https://github.com/Conflux-Chain/ConfluxWeb
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