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

web3-eth-abi

Package Overview
Dependencies
Maintainers
3
Versions
496
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth-abi - npm Package Compare versions

Comparing version 2.0.0-alpha.1 to 3.0.0-rc.0

lib/index.js

34

package.json
{
"name": "web3-eth-abi",
"namespace": "ethereum",
"version": "2.0.0-alpha.1",
"version": "3.0.0-rc.0",
"description": "Web3 module encode and decode EVM in/output.",
"repository": "https://github.com/ethereum/web3.js/tree/1.0/packages/web3-eth-abi",
"repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-eth-abi",
"license": "LGPL-3.0",

@@ -11,27 +10,18 @@ "engines": {

},
"main": "dist/web3-eth-abi.cjs.js",
"module": "dist/web3-eth-abi.esm.js",
"browser": "dist/web3-eth-abi.umd.js",
"types": "types/index.d.ts",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"test": "jest",
"dtslint": "dtslint types --onlyTestTsNext"
"compile": "tsc -b tsconfig.json",
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types"
},
"types": "types/index.d.ts",
"main": "lib/index.js",
"dependencies": {
"@babel/runtime": "^7.3.1",
"ethers": "^4.0.27",
"lodash": "^4.17.11",
"web3-utils": "2.0.0-alpha.1"
"@ethersproject/abi": "5.0.7",
"underscore": "1.9.1",
"web3-utils": "3.0.0-rc.0"
},
"devDependencies": {
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2"
"dtslint": "^3.4.1",
"typescript": "^3.9.5"
},
"files": [
"dist",
"types/index.d.ts"
],
"gitHead": "cb266cc298150f4eb1c8cdac4f41551dd8819a81"
"gitHead": "4c88fbc94d1348dfa412ebdefa1d34e50f509977"
}
# web3-eth-abi
This is a sub module of [web3.js][repo]
[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]
This is the ABI module will be used in the `web3-eth` package.
This is a sub-package of [web3.js][repo].
This is the abi package used in the `web3-eth` package.
Please read the [documentation][docs] for more.

@@ -10,2 +13,4 @@

### Node.js
```bash

@@ -18,12 +23,19 @@ npm install web3-eth-abi

```js
import {AbiCoder} from 'web3-eth-abi';
const Web3EthAbi = require('web3-eth-abi');
new AbiCoder();
Web3EthAbi.encodeFunctionSignature('myMethod(uint256,string)');
> '0x24ee0097'
```
## Types
## Types
All the typescript typings are placed in the types folder.
All the TypeScript typings are placed in the `types` folder.
[docs]: http://web3js.readthedocs.io/en/1.0/
[repo]: https://github.com/ethereum/web3.js
[npm-image]: https://img.shields.io/npm/v/web3-eth-abi.svg
[npm-url]: https://npmjs.org/package/web3-eth-abi
[deps-image]: https://david-dm.org/ethereum/web3.js/1.x/status.svg?path=packages/web3-eth-abi
[deps-url]: https://david-dm.org/ethereum/web3.js/1.x?path=packages/web3-eth-abi
[deps-dev-image]: https://david-dm.org/ethereum/web3.js/1.x/dev-status.svg?path=packages/web3-eth-abi
[deps-dev-url]: https://david-dm.org/ethereum/web3.js/1.x?type=dev&path=packages/web3-eth-abi

@@ -20,3 +20,3 @@ /*

import {AbiInput, AbiItem} from 'web3-utils';
import { AbiInput, AbiItem } from 'web3-utils';

@@ -28,13 +28,17 @@ export class AbiCoder {

encodeParameter(type: string | {}, parameter: any): string;
encodeParameter(type: any, parameter: any): string;
encodeParameters(types: Array<string | {}>, paramaters: any[]): string;
encodeParameters(types: any[], paramaters: any[]): string;
encodeFunctionCall(abiItem: AbiItem, params: string[]): string;
decodeParameter(type: string | {}, hex: string): {[key: string]: any;};
decodeParameter(type: any, hex: string): { [key: string]: any };
decodeParameters(types: Array<string | {}>, hex: string): {[key: string]: any;};
decodeParameters(types: any[], hex: string): { [key: string]: any };
decodeLog(inputs: AbiInput[], hex: string, topics: string[]): {[key: string]: string;};
decodeLog(
inputs: AbiInput[],
hex: string,
topics: string[]
): { [key: string]: string };
}
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