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

typechain

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typechain - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

1

dist/TypeChain.js

@@ -25,2 +25,3 @@ "use strict";

`typechain-target-${target}`,
`@typechain/${target}`,
ensureAbsPath(target),

@@ -27,0 +28,0 @@ ];

@@ -34,2 +34,3 @@ import { TsGeneratorPlugin, TFileDesc, TContext, TOutput } from "ts-generator";

`typechain-target-${target}`, //external module
`@typechain/${target}`, //external module
ensureAbsPath(target), // path

@@ -36,0 +37,0 @@ ];

2

package.json

@@ -11,3 +11,3 @@ {

],
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",

@@ -14,0 +14,0 @@ "repository": "https://github.com/ethereum-ts/Typechain",

@@ -28,3 +28,3 @@ <p align="center">

- IDE support - works with any IDE supporting Typescript
- extendible - work with many different APIs: `ethers.js`, `truffle`, `Web3.js 1.0` or you can create your own target
- extendible - work with many different APIs: `ethers.js`, `truffle`, `Web3.js 1.0`, `Web3.js 2.0` or you can create your own target
- frictionless - works with simple, JSON ABI files as well as with Truffle style ABIs

@@ -48,2 +48,3 @@

| [`typechain-target-web3-v1`](/packages/typechain-target-web3-v1) | [![npm](https://img.shields.io/npm/v/typechain-target-web3-v1.svg)](https://www.npmjs.com/package/typechain-target-web3-v1) | Web3 version 1.x.x support |
| [`typechain-target-web3-v2`](/packages/typechain-target-web3-v2) | [![npm](https://img.shields.io/npm/v/typechain-target-web3-v2.svg)](https://www.npmjs.com/package/typechain-target-web3-v2) | Web3 version 2.x.x support |

@@ -55,3 +56,3 @@ ## Usage

```
typechain --target=(ethers|truffle|web3-v1|path-to-custom-target) [glob]
typechain --target=(ethers|truffle|web3-v1|web3-v2|path-to-custom-target) [glob]
```

@@ -118,4 +119,8 @@

Generates typings for contracts compatible with latest Web3.js version. Typings for library itself are now part of `Web3 1.0.0` library so nothing additional is needed. For now it needs explicit cast as shown [here](https://github.com/krzkaczor/TypeChain/pull/88/files#diff-540a9b8840419be93ddb8d4b53325637R8), this will be fixed after improving official typings.
Generates typings for contracts compatible with latest stable Web3.js version. Typings for library itself are now part of `Web3 1.0.0` library so nothing additional is needed. For now it needs explicit cast as shown [here](https://github.com/krzkaczor/TypeChain/pull/88/files#diff-540a9b8840419be93ddb8d4b53325637R8), this will be fixed after improving official typings.
### Web3-2.0.0
Generates typings for contracts compatible with (unstable) Web3.js 2.x.x version. Typings for library itself are now part of `Web3 2.0.0` library so nothing additional is needed. [Usage example](https://github.com/ethereum-ts/TypeChain/blob/master/test/integration/targets/web3-v2/DumbContract.spec.web3.ts#L12).
### Your own target

@@ -158,11 +163,22 @@

```typescript
import { tsGen } from "ts-generator";
import { Typechain } from "typechain";
import { tsGenerator } from "ts-generator";
import { TypeChain } from "typechain/dist/TypeChain";
async function main() {
await tsGen(
const cwd = process.cwd();
await tsGenerator(
{ cwd },
new Typechain({ cwd, rawConfig: { files: "your-glob-here", outDir: "optional out dir path" } }),
new TypeChain({
cwd,
rawConfig: {
files: "your-glob-here",
outDir: "optional out dir path",
target: "your-target",
},
}),
);
}
main().catch(console.error);
```

@@ -169,0 +185,0 @@

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