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

eosio-abi2ts

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eosio-abi2ts - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

11

lib/index.js

@@ -47,3 +47,3 @@ "use strict";

const usedBuiltins = new Set();
let out = [];
let out = [''];
const resolveType = (type) => {

@@ -79,2 +79,3 @@ const { name, optional } = resolveOptional(type);

}
out.push('');
for (const variant of abi.variants || []) {

@@ -84,2 +85,3 @@ const types = variant.types.map((t) => `['${t}', ${resolveType(t)}]`);

}
out.push('');
for (const struct of abi.structs || []) {

@@ -96,8 +98,13 @@ let def = `${exportPrefix}interface ${typeFormatter(struct.name)}`;

out.push('}');
out.push('');
}
out.push('');
// future: add runtime and define interfaces for
// interacting with actions and tables
for (const type of [...usedBuiltins].sort((a, b) => builtins.indexOf(b) - builtins.indexOf(a))) {
out.splice(1, 0, `${exportPrefix}type ${typeFormatter(type.name)} = ${type.type}`);
out.splice(0, 0, `${exportPrefix}type ${typeFormatter(type.name)} = ${type.type}`);
}
out.push('');
// remove any double newlines
out = out.filter((line, i, all) => !(line === '' && all[i - 1] === ''));
if (options.namespace) {

@@ -104,0 +111,0 @@ out = out.map((line) => indent + line);

2

lib/version.js

@@ -1,1 +0,1 @@

exports.default = '1.2.1';
exports.default = '1.2.2';
{
"name": "eosio-abi2ts",
"version": "1.2.1",
"version": "1.2.2",
"description": "generates typescript type defenitions from eosio abi files",

@@ -19,3 +19,4 @@ "author": "Johan Nordberg",

"scripts": {
"prepublishOnly": "make test && make lib"
"prepublishOnly": "make test",
"prepack": "make lib"
},

@@ -37,2 +38,2 @@ "keywords": [

}
}
}
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