Skip to content

Commit

Permalink
Added: encode/decode tryte strings to bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vegard Bakke authored and Vegard Bakke committed Dec 29, 2017
1 parent 5ba60cf commit 244de2e
Show file tree
Hide file tree
Showing 6 changed files with 472 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
This prject is currently discussing how to convert between trytes and bytes in a good way, that may be implemented in most programming languages.


Currently this project does not contain any code.\
That might change.
Currently this project does ~~not~~ contain any code.\
~~That might change.~~ Just added a JavaScript example for encoding/deconding 'tryte strings' as bytes.\
Encoding Unicode strings to tryte strings is on the roadmap.

# What's a tryte?
Some treat 3 trits as a tryte.\
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = require("./src/trytes.js");

console.log( module.exports.encodeTryteStringAsBytes('ZZ') );
217 changes: 217 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "trytes",
"version": "1.0.0",
"description": "Conversion of trytes, bytes and text",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "mocha test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vbakke/trytes.git"
},
"keywords": [
"tryte",
"trytes",
"iota",
"conversion"
],
"author": "vbakke",
"license": "MIT",
"bugs": {
"url": "https://github.com/vbakke/trytes/issues"
},
"homepage": "https://github.com/vbakke/trytes#readme",
"dependencies": {
"chai": "^4.1.2",
"mocha": "^4.1.0"
}
}
Loading

0 comments on commit 244de2e

Please # to comment.