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

abi2oas

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abi2oas - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "abi2oas",
"version": "0.1.0",
"version": "0.1.1",
"description": "Ingests a smart contract's ABI and autogenerates an OpenAPI JSON, ready for Swagger codegen.",

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

# abi2oas
**WARNING (2018-04-12): This library is still a work in progress, not yet fully functional. API may change over time.**
Ingests a smart contract's [ABI](https://solidity.readthedocs.io/en/develop/abi-spec.html) and autogenerates a JSON conforming to the [OpenAPI Spec](https://swagger.io/specification/), ready for [Swagger Codegen](https://swagger.io/swagger-codegen/).

@@ -25,4 +23,4 @@

### Node.js (under construction)
You can also use `abi2oas1` directly within node. Install directly to your project:
### Node.js
You can also use `abi2oas` directly within node. Install directly to your project:

@@ -32,2 +30,4 @@ ```

// OR
yarn add abi2oas

@@ -37,10 +37,9 @@ ```

Import like any other package, then use the `convert` method to build the OpenAPI object:
```nodejs
```javascript
const abi2oas = require('abi2oas');
const contractApiSpec = abi2oas.convert({
version : '1.0.0',
contract : '<path_to_contract.json>'
});
const contractApiSpec = abi2oas.convert(<path_to_contract.json>, <output_path.json>, [config]);
```
`.convert()` runs synchronously and returns the serialized object corresponding to the OpenAPI JSON. `config` in this method may either be an object or a string pointing to a config JSON. Read below for config spec.

@@ -47,0 +46,0 @@ ## Method Mapping

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