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

iota-tangle

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iota-tangle - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

6

dist/factory.js

@@ -10,5 +10,11 @@ "use strict";

createTransactionFromBytes(bytes) {
if (bytes.byteLength !== transaction_1.Transaction.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!');
}
return transaction_1.Transaction.createFromBytes(bytes, this._serializer);
}
createHashFromBytes(bytes) {
if (bytes.byteLength !== hash_1.Hash.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!');
}
return hash_1.Hash.createFromBytes(bytes);

@@ -15,0 +21,0 @@ }

3

dist/hash.js

@@ -5,5 +5,2 @@ "use strict";

static createFromBytes(bytes) {
if (bytes.byteLength !== Hash.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!');
}
const hash = new Hash();

@@ -10,0 +7,0 @@ hash._bytes = bytes;

@@ -5,5 +5,2 @@ "use strict";

static createFromBytes(bytes, serializer) {
if (bytes.byteLength !== Transaction.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!');
}
const transaction = new Transaction();

@@ -10,0 +7,0 @@ transaction._serializer = serializer;

{
"name": "iota-tangle",
"version": "0.0.3",
"version": "0.0.4",
"description": "Basic models and services for IOTA's tangle",

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

@@ -18,2 +18,6 @@ import { Transaction } from './transaction'

createTransactionFromBytes(bytes: Buffer): Transaction {
if (bytes.byteLength !== Transaction.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!')
}
return Transaction.createFromBytes(bytes, this._serializer)

@@ -23,4 +27,8 @@ }

createHashFromBytes(bytes: Buffer): Hash {
if (bytes.byteLength !== Hash.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!')
}
return Hash.createFromBytes(bytes)
}
}

@@ -5,6 +5,2 @@ export class Hash {

static createFromBytes(bytes: Buffer): Hash {
if (bytes.byteLength !== Hash.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!')
}
const hash = new Hash()

@@ -11,0 +7,0 @@

@@ -8,6 +8,2 @@ import { Serializer } from './serializer'

static createFromBytes(bytes: Buffer, serializer: Serializer): Transaction {
if (bytes.byteLength !== Transaction.BYTES_SIZE) {
throw new Error('Bytes size is incorrect!')
}
const transaction = new Transaction()

@@ -14,0 +10,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