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

blockcast

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockcast - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

6

package.json
{
"name": "blockcast",
"version": "0.0.15",
"version": "0.0.16",
"description": "A decentralized messaging application protocol for publishing to the Bitcoin blockchain.",

@@ -34,4 +34,4 @@ "main": "./src/index.js",

"dependencies": {
"bitcoinjs-lib": "^1.2.0"
"bitcoinjs-lib": "^1.4.3"
}
}
}
blockcast
===
A decentralized messaging application protocol for publishing to the Bitcoin blockchain.
A decentralized messaging application protocol for micropublishing to the Bitcoin blockchain.

@@ -111,8 +111,10 @@ Publishing a document

Documents are compressed using DEFLATE and then embedded across up to 16 Bitcoin transactions in OP_RETURN outputs along with custom headers allowing for documents no larger than 607 bytes.
Documents are compressed using DEFLATE and then embedded across up to 16 Bitcoin transactions in OP_RETURN outputs along with custom headers allowing for documents no larger than 607 bytes.
This is enough space to contain a number of document digest formats, URIs and URNs. This allows for cross-platform content addressable systems such as Bittorrent and Venti.
v0.1
---
Documents are compressed using DEFLATE and then embedded in OP_RETURN outputs for a an unlimited document size.
Documents will be compressed using DEFLATE and then embedded in OP_RETURN outputs for a an unlimited document size.
However, the protocol enforces a geometric growth in transaction fees. This is intended to incentivize smaller document sizes.

@@ -119,0 +121,0 @@

@@ -15,2 +15,5 @@ var assert = require("assert");

var unspentOutput = unspentOutputs[i];
if (unspentOutput.value === 0) {
continue;
}
unspentValue += unspentOutput.value;

@@ -17,0 +20,0 @@ tx.addInput(unspentOutput.txHash, unspentOutput.index);

@@ -44,2 +44,5 @@

var unspentOutput = unspentOutputs[i];
if (unspentOutput.value === 0) {
continue;
}
unspentValue += unspentOutput.value;

@@ -51,5 +54,15 @@ tx.addInput(unspentOutput.txHash, unspentOutput.index);

};
tx.addOutput(payloadScript, 0);
tx.addOutput(payloadScript, 0);
tx.addOutput(tipDestinationAddress, tipAmount);
tx.addOutput(address, unspentValue - fee - tipAmount);
if (unspentValue - fee - tipAmount > 0) {
tx.addOutput(address, unspentValue - fee - tipAmount);
}
// AssertionError: Number of addresses must match number of transaction inputs
// this seems to be a bug in bitcoinjs-lib
// it is checking for assert.equal(tx.ins.length, addresses.length, 'Number of addresses must match number of transaction inputs')
// but that doesn't make sense because the number of ins doesn't have anything to do with the number of addresses...
// the solution is to upgrade bitcoinjs-min.js
signTransaction(tx, function(err, signedTx) {

@@ -56,0 +69,0 @@ var signedTxBuilt = signedTx.build();

@@ -41,2 +41,5 @@ var Bitcoin = require("bitcoinjs-lib");

var unspentOutput = unspentOutputs[i];
if (unspentOutput.value === 0) {
continue;
}
unspentValue += unspentOutput.value;

@@ -43,0 +46,0 @@ tx.addInput(unspentOutput.txHash, unspentOutput.index);

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