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

@iota/bundle-validator

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iota/bundle-validator - npm Package Compare versions

Comparing version 1.0.0-beta.5 to 1.0.0-beta.6

19

out/bundle-validator/src/index.js
"use strict";
/** @module bundle-validator */
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};

@@ -31,6 +34,6 @@ exports.__esModule = true;

var address = _a.address, signatureMessageFragment = _a.signatureMessageFragment, value = _a.value;
var _b, _c;
return value < 0
? __assign({}, acc, (_b = {}, _b[address] = [signatureMessageFragment], _b)) : value === 0 && acc.hasOwnProperty(address) && address === bundle[i - 1].address
? __assign({}, acc, (_c = {}, _c[address] = acc[address].concat(signatureMessageFragment), _c)) : acc;
var _b, _c;
}, {});

@@ -37,0 +40,0 @@ return Object.keys(signatures).every(function (address) { return signing_1.validateSignatures(address, signatures[address], bundle[0].bundle); });

"use strict";
exports.__esModule = true;
var samples_1 = require("@iota/samples");
var ava_1 = require("ava");
var samples_1 = require("@iota/samples");
var src_1 = require("../src");

@@ -6,0 +6,0 @@ ava_1["default"]('isBundle() returns true for valid bundle.', function (t) {

"use strict";
exports.__esModule = true;
var samples_1 = require("@iota/samples");
var ava_1 = require("ava");
var samples_1 = require("@iota/samples");
var src_1 = require("../src");

@@ -6,0 +6,0 @@ ava_1["default"]('validateSignatures() returns true for bundle with valid signatures.', function (t) {

@@ -189,3 +189,4 @@ "use strict";

return function (arr, customMsg) {
var _a = validator(arr[0]), _ = _a[0], isValid = _a[1], msg = _a[2];
var _a = validator(arr[0]), _ = _a[0], // tslint:disable-line no-unused-variable
isValid = _a[1], msg = _a[2];
return [arr, function (x) { return x.every(function (value) { return isValid(value); }); }, customMsg || msg];

@@ -192,0 +193,0 @@ };

{
"name": "@iota/bundle-validator",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "Syntactically validates bundle structure and signatures.",

@@ -14,3 +14,3 @@ "main": "./out/bundle-validator/src/index.js",

"test-ci": "nyc ava",
"format": "prettier",
"lint": "tslint --project .",
"docs": "tsc && jsdoc2md --no-cache --plugin dmd-clear -t README_tpl.hbs --files './out/**/*.js' > README.md"

@@ -68,11 +68,11 @@ },

"dependencies": {
"@iota/converter": "^1.0.0-beta.5",
"@iota/kerl": "^1.0.0-beta.5",
"@iota/signing": "^1.0.0-beta.5",
"@iota/transaction": "^1.0.0-beta.5",
"@iota/transaction-converter": "^1.0.0-beta.5"
"@iota/converter": "^1.0.0-beta.6",
"@iota/kerl": "^1.0.0-beta.6",
"@iota/signing": "^1.0.0-beta.6",
"@iota/transaction": "^1.0.0-beta.6",
"@iota/transaction-converter": "^1.0.0-beta.6"
},
"devDependencies": {
"@iota/samples": "^1.0.0-beta.5"
"@iota/samples": "^1.0.0-beta.6"
}
}

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

import test from 'ava'
import {

@@ -11,2 +10,3 @@ bundle,

} from '@iota/samples'
import test from 'ava'
import isBundle from '../src'

@@ -13,0 +13,0 @@

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

import { bundle, bundleWithInvalidSignature, bundleWithInvalidTransactionOrder } from '@iota/samples'
import test from 'ava'
import { bundle, bundleWithInvalidSignature, bundleWithInvalidTransactionOrder } from '@iota/samples'
import { validateBundleSignatures } from '../src'

@@ -4,0 +4,0 @@

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

/** @module bundle-validator */
import { Validator } from '../../guards';

@@ -2,0 +3,0 @@ import { Bundle, Transaction } from '../../types';

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

/// <reference types="bluebird" />
import * as Promise from 'bluebird';

@@ -72,3 +71,3 @@ export declare type Maybe<T> = T | void;

CHECK_CONSISTENCY = "checkConsistency",
WERE_ADDRESSES_SPENT_FROM = "wereAddressesSpentFrom",
WERE_ADDRESSES_SPENT_FROM = "wereAddressesSpentFrom"
}

@@ -75,0 +74,0 @@ export interface BaseCommand {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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