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

@ledgerhq/hw-app-ada

Package Overview
Dependencies
Maintainers
7
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/hw-app-ada - npm Package Compare versions

Comparing version 4.24.0 to 4.26.0-beta.ad904ce3

92

lib/Ada.js

@@ -7,22 +7,22 @@ "use strict";

var _regenerator = require("babel-runtime/regenerator");
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _regenerator2 = _interopRequireDefault(_regenerator);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /********************************************************************************
* Ledger Node JS API
* (c) 2016-2017 Ledger
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
var _slicedToArray2 = require("babel-runtime/helpers/slicedToArray");
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require("babel-runtime/helpers/createClass");
var _createClass3 = _interopRequireDefault(_createClass2);
var _nodeInt = require("node-int64");

@@ -36,18 +36,6 @@

/********************************************************************************
* Ledger Node JS API
* (c) 2016-2017 Ledger
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var CLA = 0x80;

@@ -86,4 +74,5 @@

var scrambleKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "ADA";
(0, _classCallCheck3.default)(this, Ada);
_classCallCheck(this, Ada);
this.transport = transport;

@@ -107,9 +96,9 @@ this.methods = ["isConnected", "getWalletRecoveryPassphrase", "getWalletPublicKeyWithIndex", "signTransaction"];

(0, _createClass3.default)(Ada, [{
_createClass(Ada, [{
key: "isConnected",
value: function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var response, _response, major, minor, patch;
return _regenerator2.default.wrap(function _callee$(_context) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {

@@ -123,3 +112,3 @@ switch (_context.prev = _context.next) {

response = _context.sent;
_response = (0, _slicedToArray3.default)(response, 3), major = _response[0], minor = _response[1], patch = _response[2];
_response = _slicedToArray(response, 3), major = _response[0], minor = _response[1], patch = _response[2];
return _context.abrupt("return", { major: major, minor: minor, patch: patch });

@@ -161,6 +150,6 @@

value: function () {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
var response, _response2, publicKeyLength, publicKey, chainCode;
return _regenerator2.default.wrap(function _callee2$(_context2) {
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {

@@ -174,3 +163,3 @@ switch (_context2.prev = _context2.next) {

response = _context2.sent;
_response2 = (0, _slicedToArray3.default)(response, 1), publicKeyLength = _response2[0];
_response2 = _slicedToArray(response, 1), publicKeyLength = _response2[0];
publicKey = response.slice(1, 1 + publicKeyLength).toString("hex");

@@ -215,6 +204,6 @@ chainCode = response.slice(1 + publicKeyLength, 1 + publicKeyLength + 32).toString("hex");

value: function () {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(index) {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(index) {
var data, response, _response3, publicKeyLength, publicKey;
return _regenerator2.default.wrap(function _callee3$(_context3) {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {

@@ -240,3 +229,3 @@ switch (_context3.prev = _context3.next) {

response = _context3.sent;
_response3 = (0, _slicedToArray3.default)(response, 1), publicKeyLength = _response3[0];
_response3 = _slicedToArray(response, 1), publicKeyLength = _response3[0];
publicKey = response.slice(1, 1 + publicKeyLength).toString("hex");

@@ -285,4 +274,4 @@ return _context3.abrupt("return", { publicKey: publicKey });

value: function () {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(txHex, indexes) {
return _regenerator2.default.wrap(function _callee4$(_context4) {
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(txHex, indexes) {
return regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) {

@@ -323,6 +312,6 @@ switch (_context4.prev = _context4.next) {

value: function () {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(txHex) {
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(txHex) {
var rawTx, chunkSize, response, i, chunk, p2, p1, res, _res, _inputs, _outputs, _txs, offset, _i, _address, _amount;
return _regenerator2.default.wrap(function _callee5$(_context5) {
return regeneratorRuntime.wrap(function _callee5$(_context5) {
while (1) {

@@ -361,3 +350,3 @@ switch (_context5.prev = _context5.next) {

if (res.length > 4) {
_res = (0, _slicedToArray3.default)(res, 2), _inputs = _res[0], _outputs = _res[1];
_res = _slicedToArray(res, 2), _inputs = _res[0], _outputs = _res[1];
_txs = [];

@@ -414,6 +403,6 @@ offset = 2;

value: function () {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(indexes) {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(indexes) {
var response, i, data, res, _digest;
return _regenerator2.default.wrap(function _callee6$(_context6) {
return regeneratorRuntime.wrap(function _callee6$(_context6) {
while (1) {

@@ -484,2 +473,3 @@ switch (_context6.prev = _context6.next) {

}]);
return Ada;

@@ -486,0 +476,0 @@ }();

{
"name": "@ledgerhq/hw-app-ada",
"version": "4.24.0",
"version": "4.26.0-beta.ad904ce3",
"description": "Ledger Hardware Wallet Cardano ADA API",

@@ -20,7 +20,7 @@ "main": "lib/Ada.js",

"dependencies": {
"@ledgerhq/hw-transport": "^4.24.0",
"@ledgerhq/hw-transport": "^4.26.0-beta.ad904ce3",
"node-int64": "^0.4.0"
},
"devDependencies": {
"@ledgerhq/hw-transport-node-hid": "^4.24.0",
"@ledgerhq/hw-transport-node-hid": "^4.26.0-beta.ad904ce3",
"chai": "^4.2.0",

@@ -27,0 +27,0 @@ "chalk": "^2.3.1",

Sorry, the diff of this file is not supported yet

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