
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
tanglestash
Advanced tools
IOTA meets BitTorrent: An algorithm to persist any file onto the tangle of IOTA
IOTA meets BitTorrent: An algorithm to persist any file onto the tangle of IOTA
Check out my other project tanglesta.sh here on GitHub which implements this module into a full-blown desktop app available for Windows, macOS and Linux.
I really like the idea of the tangle of IOTA and I think that this cryptocurrency has a bright future. I run a full node myself and want the idea to succeed. The more I messed with IOTA, the further this idea formed in my mind to use the 2187 trytes of each transactions signature to store any data on the decentralised tangle.
This module can persist any string or even files directly onto the tangle
via creating a torrent-esque chain of transactions that reference other transactions
holding the data while also referencing their direct predecessor in the chain.
That way, this module can also retrieve any data that was persisted beforehand by
just passing the 'entry-hash' into it, which is the first transaction hash of the created chain.
The data can be optionally encrypted with a secret via AES so that even if someone
gets hold of an 'entry-hash', the data will still be illegible.
Data is stored as a Base64 string and files will be automatically encoded if passed
into the algorithm as well as decoded if retrieved â no prior conversion of the file needed.
Here is a diagram of the data structure I came with for this project:

I know that primarily the persisting to the tangle is painfully slow compared to a traditional HTTP upload.
Keep in mind though that this project is more of a proof-of-concept rather than a finished product.
The reason that it takes so long is mainly the current speed of the PoW, which might get faster in the future with new techniques.
Additionally, it is important to note that this module just works with Node.js version 8 owing to the fact that a dependency is currently not functioning under version 9.
NPM
npm install --save tanglestash
Yarn
yarn add tanglestash
First off, create a new instance of the modules class
let tanglestash = new Tanglestash(provider, datatype, seed);
with the following arguments:
provider: String A URI of an IOTA full nodedatatype: String Either 'file' or 'string' based on the data that will later be usedseed: String [Optional] An IOTA wallet seed; will be automatically generated if not passed herereadFromTangleRetrieves data that was persisted onto the tangle in the past.
tanglestash.readFromTangle(entryHash, secret)
entryHash: String Any transaction hash that was output after successfully persisting data beforehand; called 'entry-hash'secret: String [Optional] The password the data was encrypted with; if anyPromise.<*> - A file buffer of the retrieved data or a string based on this.datatypesaveToTanglePersists data onto the tangle.
tanglestash.saveToTangle(data, secret)
data: String The data as a string or file path based on this.datatypesecret: String [Optional] The password the data should be encrypted with; if anyPromise.<string> - The last transaction hash of the created chain; called 'entry-hash'getNewIotaAddressRetrieves a new valid IOTA wallet address based on this.seed.
tanglestash.getNewIotaAddress()
Promise.<string> - The retrieved wallet addressgetAllMarkyEntriesReturns all the marky entries used to time the main processes.
If you've never used marky before, learn more about it here.
tanglestash.getAllMarkyEntries()
Array.<object> - All the timing entries created by markyThis project is licensed under the MIT license.
The included dynamic libraries are compiled from the ccurl repository licensed under MIT license.
If you like this module and want to support it, you can of course donate some IOTA đ
QIFKUOEQBCEV9NKFWDBTQYBHLFFORLVKDQSYDSZQQMKTCBLBFDQMJWIOUDH9DLZXVKGNQGKLSAJCQQMEDESLCTHGZD
FAQs
IOTA meets BitTorrent: An algorithm to persist any file onto the tangle of IOTA
We found that tanglestash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: whatâs affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.