forked from Emurgo/cardano-serialization-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02566a9
commit 11433a4
Showing
16 changed files
with
4,085 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
], | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"globals": { | ||
}, | ||
"rules": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
spec: "src/**/*.spec.ts", | ||
require: ["ts-node/register", "source-map-support/register"], | ||
recursive: true, | ||
"watch-extensions": ['ts'], | ||
exit: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Cardano Serialization Lib | ||
|
||
**WARNING** this library is experimental. | ||
|
||
This is a library for serialization & deserialization of types related to Cardano's Haskell implementation of Shelley. | ||
|
||
## Original specs | ||
|
||
Here are the location of the original [CDDL](http://cbor.io/tools.html) specifications: | ||
|
||
- Byron: [link](https://github.com/input-output-hk/cardano-ledger-specs/blob/master/byron/cddl-spec/byron.cddl) | ||
- Shelley: [link](https://github.com/input-output-hk/cardano-ledger-specs/blob/master/shelley/chain-and-ledger/cddl-spec/shelley.cddl#L72) | ||
|
||
# Testing | ||
|
||
First you need to install `cddl` | ||
``` | ||
sudo apt install ruby | ||
sudo gem install cddl | ||
sudo gem install cbor-diag | ||
``` | ||
|
||
You can generate new tests with | ||
1) `cddl specs/shelley.cddl generate 1 > test/name_here.diag` | ||
2) `diag2cbor.rb test/name_here.diag > test/name_here.cbor` | ||
|
||
You can combine these together with `cddl specs/shelley.cddl generate 1 | diag2cbor.rb > test/name_here.cbor` |
Oops, something went wrong.